Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change conda default pkgs_dirs and envs dirs

Tags:

linux

conda

I am using conda on a cluster. There is a space limit on the /home directory. This has reached its limits and I would like to move the ~/.conda directory to another one keeping already installed packages. What is the best way to proceed?

conda version : 4.7.5

Linux: centos

I tried:

conda config --set pkgs_dirs /mnt/lustre/users/bdiallo/.conda/pkgs/

and got the following error message:

CondaValueError: Key 'pkgs_dirs' is not a known primitive parameter.

like image 232
BND Avatar asked Jan 28 '26 21:01

BND


1 Answers

Windows:
conda config --add pkgs_dirs \\server\share\conda\pkgs

Linux:
conda config --add pkgs_dirs /mnt/lustre/users/bdiallo/.conda/pkgs/

Or manually edit .condarc in your home directory (ref):

pkgs_dirs:
  - /opt/anaconda/pkgs

Watch for typos, both pkg and dir need to be plural: pkgs_dirs.

Thanks to @darthbith and @naeem-khoshnevis in comments.

like image 189
matt wilkie Avatar answered Jan 31 '26 16:01

matt wilkie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!