Select to view content in your preferred language

Python API with Jupyter Notebook not displaying Maps

9317
17
08-05-2016 09:32 AM
JosiahCorona2
Deactivated User


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
Deactivated User

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')

0 Kudos
jp
by
Emerging Contributor

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()

0 Kudos
jp
by
Emerging Contributor

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

0 Kudos
RosenoAdri
Deactivated User

How to uninstall package?

0 Kudos
by Anonymous User
Not applicable

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

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

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

0 Kudos
by Anonymous User
Not applicable

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.

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.