Issues using ArcGIS API for Python in JupyterHub

05-12-2023 03:01 AM
Labels (1)
New Contributor

Hello everyone!

My company hosts a JupyterHub instance internally. I am looking to import and use the ArcGIS API on it by running a Conda environment with all of the required packages.

I have generated an environment.yml file of requriements using the Conda environment from ArcGIS Pro. When using that file to create a Conda environment on JupyterHub, it fails and therefore I cannot use the ArcGIS API inside of JupyterHub.

Has anyone managed to use the ArcGIS API for Python inside of JupyterHub? If so, would you be able to let me know the process you followed in setting it up. For example, did you generate an environment.yml for for a Conda environment, or use an alternate solution?

Kind regards,

Thank you all in advance!

0 Kudos
2 Replies
Occasional Contributor III

Does it generate a error trace when it fails? Can you share that here?

Also I suggest you try generating an environment from scratch instead of "all at once" and see what happens. From a command line I would just do "conda create --name arcgis -c esri arcgis" and see what happens. The dependencies for "arcgis" should load everything that arcgis api needs. Then you can add additional packages. I just tested this command here and it wants to install arcgis version; you can force it to load an older version if you need to.

Thanks for telling me about jupyterhub, I am now downloading "The Littlest Jupyter Hub" to try it.

0 Kudos
Occasional Contributor III

It would not start on my VM, so now I have to remove it.

Caveat for anyone trying out The Littlest Juptyer Hub --

"If using a VM, the recommended way to remove TLJH is destroying the VM and start fresh.


Completely uninstalling TLJH after it has been used is a difficult task because it’s highly coupled to how the system changed after it has been used and modified by the users. Thus, we cannot provide instructions on how to proceed in this case."


Update: since the environment would not start for me and I don't have time to troubleshoot today, I was able to walk through the 8 or 10 steps on that same page to remove it, so it's not as dismal as they made it sound.

0 Kudos