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

查看:1597
本文介绍了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天全站免登陆