anaconda .conda 文件夹从/home/usrxy 移动到其他位置 [英] anaconda .conda folder move from /home/usrxy to some other location

查看:60
本文介绍了anaconda .conda 文件夹从/home/usrxy 移动到其他位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个安装了 Anaconda3 的 RHEL 服务器.系统中的每个用户在 /home/ 文件夹中获得 2 GiG 空间,在安装的驱动器中获得另一个大文件夹.当用户尝试使用 conda create -n my_env 创建 conda 环境时,它会填充 .conda 文件夹中的所有 .tar 文件并中断安装.有没有办法为 .conda 文件夹指定自定义位置.

I have a RHEL server with Anaconda3 installed. Each user in the system gets 2 GiG space in the /home/ folder and another large folder in a mounted drive. When the user is trying to create a conda environment using conda create -n my_env it fills all the .tar files in .conda folder and installation breaks. Is there a way I specify a custom location for the .conda folder.

最好的贾根

推荐答案

你可以使用 --prefix 选项 文档

选项 1:如果要在当前目录中创建虚拟环境,请使用

Option 1: If you want to create your virtual environment in current directory then use

conda create --prefix=envName python=X.X

选项 2:如果您想提及目录,请提供完整路径

Option 2: if you want to mention the directory then give full path

conda create --prefix=/YourPath/yourEnvName python=x.x

选项 3:如果您不想每次都明确提及路径,并且希望所有环境默认存储在其他位置,您可以在 .condarc 文件中进行设置 文档

Option 3: If you dont want to explicitly mention the path everytime and want all your environments to be stored somewhere else by default, you can set that up in your .condarc file documentation

您可以在命令行中使用:

You can do this in command line using:

conda config --add envs_dirs <path to directory>

.condarc 文件中的

envs_dirs 将为包缓存搜索路径添加一个额外的位置.

envs_dirs in your .condarc file will add an additional location to the package cache search path.

这篇关于anaconda .conda 文件夹从/home/usrxy 移动到其他位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆