简体   繁体   English

`conda` 给出“没有这样的文件或目录”,尽管我在 .bash_profile 中添加了 PATH

[英]`conda` gives "No such file or Directory" although I added PATH in my .bash_profile

My Jupyter notebook and Conda was breaking down so I decided to remove everything and install it again.我的 Jupyter 笔记本和 Conda 出现故障,所以我决定删除所有内容并重新安装。

I installed anaconda using brew cask install anaconda Afterward, I added export PATH="/usr/local/anaconda3/bin:$PATH" in my .bash_profile (Everything from this instruction )我使用brew cask install anaconda之后,我在我的.bash_profile中添加了export PATH="/usr/local/anaconda3/bin:$PATH"本指令中的所有内容)

However, when I type conda --version it says -bash: /Users/leonard/anaconda3/bin/conda: No such file or directory但是,当我输入conda --version它说-bash: /Users/leonard/anaconda3/bin/conda: No such file or directory

  1. Why does this happen and how can I fix it?为什么会发生这种情况,我该如何解决?

  2. I just want to get my Jupyter notebook, R, and Python working.我只想让我的 Jupyter notebook、R 和 Python 正常工作。 Is it possible to use these without using Anaconda?是否可以在不使用 Anaconda 的情况下使用这些? I've been having so many troubles.我遇到了很多麻烦。

关闭该终端并重新启动,它对我有用

With the Apple M1 chip, I did the following to get into the problem.使用 Apple M1 芯片,我执行了以下操作来解决问题。

  1. Installed miniconda at custom path /Users/myApple/opt/miniconda在自定义路径/Users/myApple/opt/miniconda
  2. Then for tensorflow I installed miniforge at /Users/myApple/miniconda然后对于 tensorflow,我在/Users/myApple/miniconda
  3. Which gave me the following issue, when I entered "conda env list" Similar to this当我输入“ conda env list”时,这给了我以下问题
  4. Then I reinstalled miniforge in the same dir as miniconda然后我在与 miniconda 相同的目录中重新安装了 miniforge

And finally, I got the error conda gives No such file or Directory .最后,我得到了错误 conda 给出了No such file or Directory



**Solution:** **解决方案:**
  • Already mentioned in the question itself, to add the newly installed miniforge path to .bash_profile已经在问题本身中提到,将新安装的 miniforge 路径添加到 .bash_profile
  • removed older installation of miniforge删除了 miniforge 的旧安装
  • Close that terminal and restart,It worked for me

And all is working now Thank you all现在一切正常 谢谢大家

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM