Anaconda on Windows : how to isolate environment folder & installation folder

0

In a school, I installed Anaconda on the local drive of each computer C:\Anaconda3 (as admin). OS is Windows 10.

So the base environment is also : C:\Anaconda3 (writable) for every user.

To keep C:\Anaconda3 as clean as possible, I would like to isolate/separate the users' base environment. A better folder would be C:%HOMEPATH%\envConda (like C:\Users\user1234) because this folder is different for everyone.

So, I created a .condarc file in C:\Anaconda3 :

envs_dirs:
  - C:\%HOMEPATH%\\envConda
auto_activate_base: False

And I added an environment variable in anaconda-navigator-script.py

import os
os.environ['CONDA_ENVS_DIRS']="C:\%HOMEPATH%\envConda"

But, these changes are not enough => here is the conda info :

 base environment : C:\Anaconda3  (writable)
 ...
 envs directories : C:\Users\admin2\envConda
                    C:\Anaconda3\envs

I think, I should insert a script in anaconda-navigator-script.py or cwp.py which deactivate base environment and create/activate a new environment in the profile folder. But I don't know how to manage that in python.

NB : Of course, I can't install Anaconda in the local profile folder because the folder depends on the username.

Thank you very much for any help !!!

NLG

Posted 2019-06-11T11:32:54.133

Reputation: 1

No answers