Python API with Jupyter Notebook not displaying Maps

5283
17
08-05-2016 09:32 AM
JosiahCorona2
New Contributor II


I can get everything else returned except the maps. I know the page says its subject to change. Any ideas?

Seems this step might be the issue:

Enable map widget:

The ArcGIS Python API includes a map widget for embedding maps in the Jupyter notebook environment. To enable the map widget for all users, use the following command:

python -m arcgis.install

If you are on a Linux system and do not have permission to install the widget system-wide, you can install it in your local user profile by using the following command instead:

python -m arcgis.install -u

You can now start using the ArcGIS Python API in your Python IDE of choice, or the Jupyter Notebook environment.

Tags (2)
17 Replies
AndrewHargreaves
Occasional Contributor II

I have this issue to but I DO get an error, namely:


C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>python -m arcgis.install


C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe: Error while finding spec for 'arcgis.install' (<class 'ImportError'>: No module named 'arcgis')

Reply
0 Kudos
jp
by
New Contributor II

I have the same environment as above and installed with: conda install  -c esri arcgis. as per the Install and Set Up | ArcGIS for Developers

But map isn't returned with my_gis.map()

Reply
0 Kudos
jp
by
New Contributor II

I uninstalled and reinstalled arcgis package and the map is displayed now. 

Reply
0 Kudos
RosenoAdri
New Contributor

How to uninstall package?

Reply
0 Kudos
AtmaMani
Esri Contributor

After activating your environment in which you install the API, try below to remove `arcgis` package

conda remove arcgis
Reply
0 Kudos
simoxu
by MVP Regular Contributor
MVP Regular Contributor

Thanks, 'python -m arcgis.install' works.

Reply
0 Kudos
SandeepKumar1
Esri Contributor

Can you try installing arcgis again, If you still get that error try cleaning conda cache by 'conda clean -t' and then try to install arcgis.

Reply
0 Kudos
PaulMallas
New Contributor

I found my issue to be I was launching 'jupyter lab' not 'jupyter notebook' as per the instructions. Force of habit.  Once I made that change, the maps displayed fine.