How to change conda base directory (where .condarc resides)

2

In Windows 10, anaconda creates .conda and .condarc in in %userprofile%. I want to move this so that I can have a Anaconda instalation under Windows and another under WSL (Ubuntu), each with its environments and settings. How does one move or set the base directory in conda?

(base) C:\Users\user>conda info

     active environment : base
    active env location : C:\Users\user\AppData\Local\Continuum\anaconda3
            shell level : 1
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\.condarc
          conda version : 4.6.11
    conda-build version : 3.17.8
         python version : 3.7.3.final.0
       base environment : C:\Users\user\AppData\Local\Continuum\anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\user\AppData\Local\Continuum\anaconda3\pkgs
                          C:\Users\user\.conda\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\user\AppData\Local\Continuum\anaconda3\envs
                          C:\Users\user\.conda\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763
          administrator : False
             netrc file : None
           offline mode : False

tiagoams

Posted 2019-04-24T13:08:25.747

Reputation: 21

No, I want to set a different location for .conda and .condarc for one of the installations so that they don't clash. – tiagoams – 2019-04-25T08:55:44.110

Answers

0

It turns out two conda instalations, one under Windows Subsystem for Linux, and another under Windows, will not clash:

Under WSL bash shell:

(base) $ conda info| grep "user config file"
       user config file : /home/tams00/.condarc
(base) $

On the anaconda powershell:

(base) PS>conda info | Select-String -Pattern "user config file"

       user config file : C:\Users\tams00\.condarc

(base) PS>

Although this was not immediately obvious to me /home/user/ is different from C:\Users\user.

See this post for details.

tiagoams

Posted 2019-04-24T13:08:25.747

Reputation: 21