Select to view content in your preferred language

ArcGIS Pro 3.0 "Failed to create notebook server" after installing additional Python package

1212
5
07-13-2022 07:26 AM
ReinhardtBotha
New Contributor III

Has anyone been able to install additional python packages for their cloned Python Environment in ArcGIS Pro 3.0 succesfully? I have been struggling to install the cartopy package.

Using the Package Manager, if I initially search for cartopy it finds nothing.

So I used conda in the Python Command prompt to install it with: 

conda install -c conda-forge cartopy

Doing this successfully installs the package and it also shows up in my Package Manager afterwards:

Screenshot 2022-07-13 161809.jpg

However, now when I open any notebook, or try to create a new one I get the "Failed to create notebook server" error:

Screenshot 2022-07-13 162002.jpg

Any suggestions will be appreciated!

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

When you conda installed, did any other packages get added?, changed? 

I would do

conda list --revisions

then if you want to roll back to a prior state

conda install --revision X

where X is the number of the state where all was good


... sort of retired...
0 Kudos
ReinhardtBotha
New Contributor III

Other packages got added and some were changed yes. The latest revision was revision 2, where I can see the cartopy packages were added. I rolled back to revision 0 and still get the same error when I try to open a notebook now. Wonder what is causing this. 

Update: When switching back to the default Python environment, the notebooks work fine again. So seems like something happens to the cloned environment after the conda install.

DanPatterson
MVP Esteemed Contributor

Delete the clone, reclone, install cartopy first, try it out, and if it works then it is the other packages that may be causing the issue with cartopy.  Incrementally add the additional packages to see if you can narrow down the problem.

Also, record and changes conda may want to make when you install cartopy or use

>>> conda install cartopy --dry-run

to get a pre-test of the installs desires and note them here if you problem isn't resolved


... sort of retired...
0 Kudos
ShaunWalbridge
Esri Regular Contributor

For earlier Pro releases, we had made a custom build of cartopy and put that up into our Esri channel, but hadn't done that work for Pro 3.0. Because of its use of a number of packages which overlap with the core distribution of Pro, it may be challenging to get a solid build without some work on our end, but I would start with this:

Run a clone from the UI or with `conda create --clone arcgispro-py3 --name cartopy --pinned`. The `--pinned` here is important because that will constrain the package set for things like Notebooks to the versions we use in Pro. In this created environment after activating, try just running `conda install cartopy`. If that doesn't solve, it means that some of the packages Pro requires aren't compatible with the build up on Anaconda. As a short-term fix you may want to make a separate environment without ArcPy and install cartopy into that, but obviously that's not ideal.

Cheers, Shaun

0 Kudos
ReinhardtBotha
New Contributor III

Thank you for the reply and information @ShaunWalbridge, I'll have a look at this again at a later stage and post my findings.

0 Kudos