Can I reset conda to installation state?

13689
17
06-24-2020 03:10 PM
EvanThoms
Occasional Contributor II

With a new install of Pro 2.5, I have, between trying to manage environments at the command line and through the Package Manager, kludged up my conda. When I open the Package Manager now, the Project Environment window is blank and when I try to activate arcgispro-py3 (the only environment I have remaining at this point), the progress bar at the bottom of the dialog just scrolls and scrolls and the message remains 'Restart ArcGIS Pro for your environment changes to take place'. Of course, closing everything, apparently mid-process, and restarting does nothing.

Another thing that happens is that after a computer restart %localappdata%\ESRI\conda\envs\proenv.txt has the path to an environment I have removed and when I open the Python Command Prompt, conda is not available as a program. When I manually change that to arcgispro-py3, I can open the prompt and it's all good but that manual edit to proenv.txt does not stick. Something else writes it after a reboot. What process writes that file and where does it remember the environment?

Barring that, because these are all changes that I made as a non-admin user, is there something I can do to just wipe the slate and get me back to the original state of the conda installation?

0 Kudos
17 Replies
JoeBorgione
MVP Emeritus

If it were me, I'd remove ArcGIS Pro 2.5 and start from there....

That should just about do it....
0 Kudos
DanPatterson
MVP Esteemed Contributor

Joe Borgione‌ that doesn't remove everything, admin rights, cleaning out user profiles etc are more important.  New computer is an option too 


... sort of retired...
0 Kudos
DanPatterson
MVP Esteemed Contributor

You don't have admin rights to your computer?

Can you use conda?

If you are using Pro, can you delete your other environments using the package manager?

Can you uninstall/repair you installation?

Some starter questions to assess what you can and can't do


... sort of retired...
0 Kudos
EvanThoms
Occasional Contributor II

That's right, I don't have admin rights. I would need help from IT to uninstall or do a repair.

I can use conda.

I deleted the other environments using conda.

0 Kudos
DanPatterson
MVP Esteemed Contributor

Can you activate your default conda environment either through the package manager or through Pro?

If so, that is good.

If not, then what environment are you in?  (check this through conda or through Project, Python, Manage Environments )


... sort of retired...
0 Kudos
EvanThoms
Occasional Contributor II

When the contents of %localappdata%\ESRI\conda\envs\proenv.txt is

C:\ArcGIS\Pro\bin\Python\envs\arcgispro-py3

the Python Command Prompt opens as expected:

(arcgispro-py3) C:\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>


But I can't switch to that in Pro; that's when Pro churns.

 

DanPatterson
MVP Esteemed Contributor
(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda info --envs
# conda environments:
#
arcgispro-py3         *  C:\arc_pro\bin\Python\envs\arcgispro-py3
root                     C:\arc_pro\bin\Python


(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>

What does yours say?  c:\arc_pro is where I have Pro installed so do the mental substitution.

If your active environment is something other than

....\bin\Python\envs\arcgispro-py3

do this to activate the base environment in conda

>activate arcgispro-py3

... sort of retired...
EvanThoms
Occasional Contributor II

And I can use conda to re-create the clone of arcgispro-py3 that is being remembered, add that path to proenv.txt, and the Package Manage will open pointing to that environment, but I still cannot switch to another environment in Pro.

EvanThoms
Occasional Contributor II

Dan, I have

(arcgispro-py3) C:\ArcGIS\Pro\bin\Python\envs\myclone>conda env list
# conda environments:
#
arcgispro-py3    * C:\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
myclone            C:\ArcGIS\Pro\bin\Python\envs\myclone
root               C:\ArcGIS\Pro\bin\Python