Broken Conda Base Environment

1821
2
05-05-2021 05:15 AM
Labels (1)
dlund203
New Contributor II

I was recently trying to install shapely and geopandas onto my ArcGIS Pro base conda environment (which I now know is a bad idea), but in the process of installing/uninstalling packages, my Python version got upgraded to 3.7.10 and connections to several environments were broken. Now I can't open a project in Pro without an immediate crash, and I can't "conda install --revision 0" because that leads to a bunch of PackagesNotFoundErrors. 

 

Ideally, I would like to get a clean new conda base environment, but failing that, I think my best bet would be to uninstall/reinstall Pro. However, I don't want to do that unless I can be sure I'll be able to do that with my single-use license.

Tags (1)
0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

Well, you learned the same lesson I have: don't mix geopandas and Esri stuff. Even having geopandas and the ArcGIS Python API, much less arcpy, in the same env sometimes leads to weird issues that won't resolve easily. If you have to mix them, clone an env for that purpose, just in case it goes pear-shaped on you.

Your single-use license ought to be independent of the program itself, and you should be able to uninstall / reinstall without issue.

- Josh Carlson
Kendall County GIS
DanPatterson
MVP Esteemed Contributor

Uninstall Pro, then rename the remnants of the installation folder by adding _old to it. 

There will be remnants of the installation, so don't miss this step.

Similarly, rename the C:\Users\... You ... \AppData\Local\ESRI by adding _old to it

Download the *.exe again if you didn't and get ready to install it. 

Run the *.exe.  and it will produce a *.msi which does the actual installation... keep it if you have to reinstall

Since you are a single user, there is no reason to let it install Pro where it wants.

I use C:\arc_pro as my installation folder.

Install Pro as the sole user into that folder.

You can install packages into the base environment without issue or revert using conda install --revision 0 if you keep record of what you installed using

conda install blah-blah --no-pin --dry-run

first.  Anything that wants to change what Pro has installed isn't a good idea, nor is it anything that wants to compete with arcpy.

numpy, Spyder, matplotlib, scipy and any of the stack-related packages can be safely installed and/or upgraded within the base environment.

If you plan to do the deep-learning stuff you need a cloned environment or better yet, a separate machine and a real reason why you need to use it.... stick to shallow-learning instead 😉

Save your own environment.yml file when you are done. 


... sort of retired...