I have two conda installations that I need for different projects :
C:\Users\<user>\AppData\Local\anaconda3
C:\Program Files\ArcGIS\Pro\bin\Python
However, when I use the Anaconda Prompt icon (from Anaconda installation), I keep getting the envs from the ArcGIS Pro installation.
The Anaconda Prompt icon use the following command : %windir%\System32\cmd.exe "/K" C:\Users\<user>\AppData\Local\anaconda3\Scripts\activate.bat C:\Users\<user>\AppData\Local\anaconda3
.
But if I display the available environments with conda env list
, I get :
# conda environments:
#
base C:\Program Files\ArcGIS\Pro\bin\Python
arcgispro-py3 C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
* C:\Users\<user>\AppData\Local\anaconda3
And if I create a new env (here named test
), it is created in the ArcGIS folder (ESRI is the name of the company owning ArcGIS):
test C:\Users\<user>\AppData\Local\ESRI\conda\envs\test
Uninstalling ArcGIS Pro corrects the problem :
# conda environments:
#
base * C:\Users\<user>\AppData\Local\anaconda3
test C:\Users\<user>\AppData\Local\anaconda3\envs\test
However, after reinstalling it, the problem reappeared.
Anyone knows which files need to be modified to keep the ArcGIS Pro conda installation apart from the Anaconda one ?
Not sure where the problem came from, but I managed to overwrite the conda root_prefix
parameter. So now, the ArcGIS Pro envs do not appear.
In the Anaconda Prompt :
conda config --set root_prefix C:\Users\<user>\AppData\Local\anaconda3
Verification :
conda env list
gives :
# conda environments:
#
base * C:\Users\<user>\AppData\Local\anaconda3
test C:\Users\<user>\AppData\Local\anaconda3\envs\test