問題描述
我有一個安裝了 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 移動到其他位置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!