Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

conda config change default env directory

Tags:

conda create -n EvnName python=3.6 keeps installing my Env in user home instead of the env directory of my Anaconda installation /data/anaconda3/envs

conda info gives me

Current conda install:

           platform : linux-64
      conda version : 4.3.30
   conda is private : False
  conda-env version : 4.3.30
conda-build version : not installed
     python version : 3.6.1.final.0
   requests version : 2.14.2
   root environment : /data/anaconda3  (read only)
default environment : /data/anaconda3
   envs directories : /data/anaconda3/envs
                      /home/tlinden/.conda/envs
      package cache : /data/anaconda3/pkgs
                      /home/tlinden/.conda/pkgs
       channel URLs : https://repo.continuum.io/pkgs/main/linux-64
                      https://repo.continuum.io/pkgs/main/noarch
                      https://repo.continuum.io/pkgs/free/linux-64
                      https://repo.continuum.io/pkgs/free/noarch
                      https://repo.continuum.io/pkgs/r/linux-64
                      https://repo.continuum.io/pkgs/r/noarch
                      https://repo.continuum.io/pkgs/pro/linux-64
                      https://repo.continuum.io/pkgs/pro/noarch
        config file : /home/tlinden/.condarc

/home/tlinden/.condarc only contains:

envs_dirs:
  - /data/anaconda3/envs

The reason I always want to install the env in /data/anaconda3/envs is because we have very limited space in the home directory

like image 897
galinden Avatar asked Feb 01 '18 10:02

galinden


People also ask

How do I change environment location in conda?

In summary, if you edit . condarc to include D:\envs , and then run conda env create -p D:\envs\myenv python=x.x , then activate myenv (or source activate myenv on Linux) should work. Hope that helps!

Can I move conda environment to another directory?

conda environments can get pretty big, so if you're running low on hard disk space and have another drive mounted, you can easily move your environment to a directory on the other drive and create a symbolic link to the new location.

How do I change conda config?

To set configuration options, edit the . condarc file directly or use the conda config --set command. For a complete list of conda config commands, see the command reference. The same list is available at the terminal or Anaconda Prompt by running conda config --help .

Where is my conda environment saved?

All Installed Conda Environments are stored in your Block Volume in the /home/datascience/conda directory.


1 Answers

the reason the environment was installed in the user home was because of the permissions for the /data/anaconda3/envs directory, after changing that new environments install in the /data/anaconda3/envs directory

like image 171
galinden Avatar answered Sep 19 '22 13:09

galinden