解决Anaconda3安装后终端无法使用conda的问题

2019-07-30  本文已影响0人  KoooOooooK

安装好Anaconda3后,终端仍然无法使用conda命令。使用网络上的教程在~/.bash_profile文件中添加

export PATH="/anaconda3/bin:$PATH"

保存后,执行

source ~/.bash_profile

该方法只是暂时有效,当重新打开终端窗口时,又无法使用conda命令了。


经过分析,我发现我现在使用的shell是zsh,因此,环境配置文件不是.bash_profile文件,而应该是.zshrc文件。

.zshrc文件中添加如下语句

export PATH="/anaconda3/bin:$PATH"

保存后,执行

source .zshrc

总结:配置环境前先确认自己使用的shell类型再说。

上一篇 下一篇

猜你喜欢

热点阅读