安裝
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ./Miniconda3-latest-Linux-x86_64.sh
回車到最后按照輸入yes,之后按提示操作。
激活
conda activate
如果沒有反應或者返回:
bash: conda: command not found
則需要激活:
vim ~/.bashrc
export PATH=$PATH:xxx/miniconda3/bin
xxx為你的安裝路徑
ESC鍵 :wq 回車退出
source ~/.bashrc
conda init
創建環境
conda create -n xxx python=3.10.16
conda activate xxx
注意事項
如果報錯
conda init before conda activate
把當前這個終端關掉重新開一個就好了。