Anaconda Installation on Mac: conda command not found 环境变量配置

Mac系统安装完Anaconda 3.7后在terminal输入conda --version,返回command not found

原因可能是没有配置环境变量

  1. 在terminal输入vi ~/.bash_profile,检查环境变量已配置
  2. 在terminal输入export PATH=~/opt/anaconda3/bin:$PATH,当前有效,重启terminal后失效
  3. 在terminal输入source ~/.bash_profile,当前有效,重启terminal后失效
  4. 发现zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’ 文件中并没有定义任务环境变量
  5. 如果没有 .zshrc 文件, 在相应目录下执行 touch .zshrc 创建文件,添加 source ~/.bash_profile。 完美生效。

Ref:

https://blog.csdn.net/science_Lee/article/details/79214127

posted @ 2020-02-22 22:48  Sherrrry  阅读(939)  评论(0编辑  收藏  举报