Select to view content in your preferred language

Standalone ArcPy Anaconda Distribution for ArcGIS Pro 3.0 crashes Jupyter Notebook Kernel in VSCode

3268
13
06-26-2022 06:39 AM
feralcatcolonist_old
Occasional Contributor II

After creating a new ArcPy environment within a standalone installation of Anaconda, any attempt to import ArcPy within a VSCode Jupyter Notebook crashes the kernel.

This same setup worked without any issues since ArcPy was released on Anaconda in 2.7.

ArcPy also successfully imports within a standard Jupyter Notebook launched from the standalone installation of Anaconda.

This is a bare-bones recipe for creating an ArcPy environment within Anaconda.

 

 

conda create -n esri
conda activate esri
conda install -c esri arcpy

 

 

 


Likes an array of [cats, gardening, photography]
13 Replies
mmann1123
New Contributor II

I am having the same problem! Environment built with:

conda create -n esri  arcpy arcgis -c esri

One more strong argument for me stopping teaching esri in my classes!  Jesus. Can't even open a real bug report.

I tried cloning the arcpro environment into my anaconda folder - vscode can't even connect to it... 😞

Anyone have a specific work around for this?

0 Kudos
feralcatcolonist_old
Occasional Contributor II

I just found a temporary fix, downgrade the following package:

conda install libprotobuf=3.19.1=h23ce68f_0

This will allow ArcPy to import successfully within a VSCode notebook. Unfortunate, but probably a good talking point about library conflicts, package management, and sometimes you have to have a workaround.

feralcatcolonist_0-1663462281789.pngferalcatcolonist_1-1663462396991.png


Likes an array of [cats, gardening, photography]
0 Kudos
ShaunWalbridge
Esri Regular Contributor

Thanks for your report of this fix. We've uploaded a new build of the ArcPy package for 3.0 which reflects this change and should work for any new environments, or after doing conda upgrade arcpy in an affected environment.

Cheers, Shaun

DanPatterson
MVP Esteemed Contributor

I am even having issues with Spyder in a clone not being able to update.  Issues are with the pinned <= requirements in arcpy/arcgis since they are co-dependent.  Most recently jupyter-client has been an issue if I remember correctly.  

Good luck


... sort of retired...
0 Kudos