在终端输入conda info --envs
查看miniconda是否安装成功,发现报错:conda: command not found(原因是~/.bashrc文件没有配置好)
[解决步骤]:
- 找到你的miniconda3位置(例如:/home/hd/miniconda3/bin)
- vim ~/.bashrc(在最后一行添加以下内容,然后按esc键退出,wq:保存退出)
export PATH=$PATH:/home/hd/miniconda3/bin
# >>> 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(添加后激活)