- 找到
~/.bashrc
文件,然后将以下内容添加到最后一行。
#>>> conda initialize >>>
#!! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/hd/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/hd/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/hd/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/hd/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
#<<< conda initialize <<<
-
source ~/.bashrc
-
conda create -n envs-name(eg. buchao-envs) python==3.7
-
conda info --envs
查看新生成的环境