问题
Please note this error is different than what shows up (and has answer) in stackoverflow. It is definitely not duplicated.
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
and the command completed successfully.
What's wrong with conda?
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
Note I have been using root to install packages.
Any clue is appreciated.
Thank you very much.
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>
回答1:
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
It looks like further versions of conda are introducing this error.
来源:https://stackoverflow.com/questions/54758234/anaconda-modulenotfounderror-no-module-named-conda