How to permanently set the base conda environment directory?

Viewed 921

I want to setup a multi-user shared anaconda setup. I have read this page for admins: https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/admin-multi-user-install.html

I want to ensure that when users create a new environment using conda create -n <name>, it creates in /anaconda/envs/ rather than /home/<user>/.conda/envs/. How do I do that?

I have followed this: https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#specify-environment-directories-envs-dirs, but I am unable to. The only way to do it via the -p flag i.e. conda create -p /anaconda/envs/<name>.

There is no file called /home/<user>/.condarc yet it defaults the environment creation to the home conda folder.

When I use conda info:

     active environment : None
       user config file : /home/xyz/.condarc
 populated config files : /home/xyz/.condarc
          conda version : 4.5.5
    conda-build version : 3.0.27
         python version : 2.7.15.final.0
       base environment : /anaconda  (read only)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /anaconda/pkgs
                          /home/xyz/.conda/pkgs
       envs directories : /home/xyz/.conda/envs
                          /anaconda/envs
               platform : linux-64
             user-agent : conda/4.5.5 requests/2.9.1 CPython/2.7.15 Linux/4.15.0-1046-azure ubuntu/16.04 glibc/2.23
                UID:GID : 1004:1004
             netrc file : None
           offline mode : False

I am unable to override the user level condarcs.

0 Answers
Related