anaconda .conda folder move from /home/usrxy to some other location(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 移动到其他位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:anaconda .conda 文件夹从/home/usrxy 移动到其他位置
基础教程推荐
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- matplotlib 设置 yaxis 标签大小 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
