Anaconda:ModuleNotFoundError:没有名为"conda"的模块 [英] Anaconda: ModuleNotFoundError: No module named 'conda'

查看:1372
本文介绍了Anaconda:ModuleNotFoundError:没有名为"conda"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请注意,此错误与stackoverflow中显示的错误(并有答案)不同.绝对不会重复.

Please note this error is different than what shows up (and has answer) in stackoverflow. It is definitely not duplicated.

我以前见过此错误,并且能够通过修改PATH来包含conda的路径来解决此错误,如下所示:

I have seen this error before and has been able to fix it by modifying the PATH to include conda's path like below:

export PATH=/opt/cloudera/parcels/Anaconda/bin:$PATH
echo $PATH
/opt/cloudera/parcels/Anaconda/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/git/bin:/home/rxie/bin

由于未知原因,该错误再次在此处弹出,即使我开始了新的会话后该错误也不会消失.

For unknown reason, the error pops up again here, and doesn't go away even after I started a new session.

我执行的最后一条命令是:

The last command I executed was:

conda upgrade -c conda-forge imbalanced-learn

命令成功完成.

conda有什么问题?

What's wrong with conda?

这是Anaconda的目录:

Here is the directory of Anaconda:

#ls -la /opt/cloudera/parcels/Anaconda/bin/conda
-rwxrwxr-x 1 root root 531 Feb 18 16:29 /opt/cloudera/parcels/Anaconda/bin/conda

请注意,我一直在使用root来安装软件包.

Note I have been using root to install packages.

任何线索都值得赞赏.

非常感谢您.

更新: 谢谢@merv,我读了您对其他主题的回答.虽然症状不完全相同,但我确实尝试了第一步,即sudo pip install conda,此后,conda仍然会抛出相同的错误,因此您无法在conda install --revision <n-1>

UPDATE: Thank you @merv, I read your answer to the other thread. Not exactly same symptom though, I indeed tried out the first step which is to sudo pip install conda, after that, expectedly conda still throw same error so there is no way to continue with step 2 in your answer of conda install --revision <n-1>

推荐答案

我按照此问题的建议安装了conda 4.6.14版本,从而解决了这个问题

I solve this problem installing the version 4.6.14 of conda as suggested on this issue 9004 before perform further installs.

conda install conda=4.6.14

conda install conda=4.6.14

conda的其他版本似乎正在引入此错误.

It looks like further versions of conda are introducing this error.

这篇关于Anaconda:ModuleNotFoundError:没有名为"conda"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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