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