Error Message
When using the API for Python to display a WebMap with the Map Widget code, the following code displays in Jupyter Notebook but not in Jupyter Lab:
from arcgis.gis import GIS
gis = GIS()
map = gis.map()
map
Cause
The map widget was built using the ipywidgets library for Jupyter Notebooks, which doesn't port directly to jupyterlab.
Solution or Workaround
- Download the Anaconda Python distribution application (https://www.anaconda.com/download/).
- Install it so that all users have access to Anaconda.

- After installation, open the Anaconda Prompt – search programs or in Windows in the Anaconda3 application folder. Right-click and select Run As Administrator
- When the application opens, test to see what version of arcgis module is loaded by entering in the Anaconda Prompt:
conda list
- If the list shows 1.5, move to Step 5.
- If the list shows 1.4, in the Anaconda Command Prompt type:
conda upgrade -c esri arcgis
- When prompted to "Proceed [y]/n?" press y and press Enter on the keyboard
- Once the installation is complete the Anaconda Prompt indicates a successful install with “done”
- In the same Anaconda Command Prompt console install the nodejs module (a platform for easily building fast, scalable network applications). In the Prompt type:
conda install -c conda-forge nodejs
and press Enter on the keyboard
- In the same console install the following two Jupyter Lab extensions:
jupyter labextension install @jupyter-widgets/jupyterlab-manager
and press Enter on the keyboard, this module may take time to load.
jupyter labextension install arcgis-map-ipywidget@1.5.0
and press Enter on the keyboard, this module may take time to load.
Once the arcgis module is updated and the nodejs and two Jupyter Lab extensions are installed running the Map Widget in Jupyter Lab will display properly.