update cloned python environment(s) while updating arcgis pro

5008
13
08-19-2019 02:17 PM
Status: Implemented
Labels (1)
Martin_Döllerer
New Contributor III

Hi esri folks,

thank you very much for including a python package manager into ArcGIS Pro!

Unfortunately, my installed packages have got lost just by every update of Pro since then, because cloned python environments haven't been taken into account during the update process...

Happy GISing,

Mascht

Tags (2)
13 Comments
Martin_Döllerer

High Esri folks,

many thanks to everybody involved in implementing my Idea. Worked nicely after updating Pro to 3.0.

Happy GISing,
Mascht

FakeName

Definitely didn't work when I updated from 3.1.x to 3.2.0. The "update" simply deleted the clone after about 10 minutes 😞

ShaunWalbridge

@FakeName I took a look at this, and I think I've identified what the issue is. If you have any existing resources open that reference the environment directory, it will currently cause a failure. So for example, if you have a command line prompt at the working directory of the environment, that will lock the location and Windows won't be able to delete the folder. There is a second bug which is that the restore doesn't happen in this case either. I have local fixes for these issues and will look to get them into software, for now, here's a workaround:

1. Your environment doesn't get deleted, it is archived first. If you navigate to %LOCALAPPDATA%\Esri\conda\envs, you should see a file called <env name>.tar.bz2. This is a conda-pack archive of your environment, you can extract it with current builds of Windows 11, 7-zip or by using conda pack to restore your old environment from Pro 3.1.

2. Once you have that in hand, from the Package Manager interface of Pro you can add the environment back to the environment list. If you do this, then ensure that no other resources are referencing that environment, the upgrade should work as expected.

Sorry for the trouble and will look to fix this soon.
Cheers, Shaun