即使导出了路径,也找不到conda命令 [英] conda command not found even though path is exported

查看:246
本文介绍了即使导出了路径,也找不到conda命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在自己的主目录中安装了anaconda3.这是我在终端中看到的:

I installed anaconda3 into my home directory. This is what I am seeing within the terminal:

和我的.bash_profile看起来像这样:

and my .bash_profile looks like this:

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

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

所以我不明白为什么无法识别conda.当我导航至anaconda3/bin时,其中有一个名为conda的文件,但是即使我尝试在该路径中调用它,也仍然找不到该文件.

So I don't understand why conda is not being recognized. When I navigate to anaconda3/bin there is a file called conda in there, but even when I try to call it within that pathway it is still not found.

推荐答案

发现者,您到conda的路径不正确.

Spotter, your path to conda is incorrect.

我在High Sierra MAC OS上,刚刚通过HomeBrew命令安装了Anaconda3.我在运行时遇到问题:

I'm on High Sierra MAC OS and just installed Anaconda3 via HomeBrew command. I had issue with running :

 conda

它也会给我:

-bash: conda: command not found

我尝试跑步:

export PATH=~/anaconda3/bin:$PATH

但是它需要整个路径.所以这是正确的步骤:

but it needs ENTIRE path. so here are the correct steps:

$ nano ~/.bash_profile

现在导出整个路径,在我的情况下是:

Now export the ENTIRE path, in my case it was:

export PATH=/usr/local/anaconda3/bin:$PATH

退出并运行:

$ source ~/.bash_profile

然后尝试:

$ conda

它将输出:

 $ conda --version
    conda 4.4.10

这篇关于即使导出了路径,也找不到conda命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆