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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM