0

I want to install Anaconda on my x64 Windows machine, and I downloaded the Python 2.7 version 64-bit installer. The installation process looks good.

Then I installed pip with choco and installed several packages like zbar, however, when I want to try to launch Anaconda, I entered conda in Powershell, this is what I got:

Traceback (most recent call last):
  File "C:\Users\Ruiyang\Anaconda2\Scripts\conda-script.py", line 3, in <module>
    import conda.cli
ImportError: No module named conda.cli

Does anyone knows how to fix this?

Elderry
  • 1,902
  • 5
  • 31
  • 45

3 Answers3

0

add anaconda's bin directory to path. set path=whatever\anaconda\bin;path;

arman
  • 141
  • 1
  • 11
  • Just checked,`C:\Users\\Anaconda2`, `C:\Users\\Anaconda2\Scripts` and `C:\Users\\Anaconda2\Library\bin` are all in path already. The installer did the job. – Elderry Apr 01 '17 at 09:10
  • is any `C:\Users\\**Anaconda2\bin**` directory there? – arman Apr 01 '17 at 09:14
  • Nope, there is no such directory. I created one and added it to path, not work. – Elderry Apr 01 '17 at 09:27
0

This issue is related to the path variable setting. Quoting from another SO post:

fire up your interpreter and add this line: export PATH=/Users/add your username here/anaconda/bin:$PATH

Now type python into the interpreter and you will see Anaconda 1.8.0 or whatever version you have. You will have to do this each time you start a new interpreter.

Also, note that this might occur when the user name in the path on windows contains a space character. Taken from here.

Community
  • 1
  • 1
devautor
  • 2,506
  • 4
  • 21
  • 31
0

Though @devautor's method doesn't work for me, a comment in his reference shows me the correct answer:

Unset both PYTHONPATH and PYTHONHOME, then my problem is solved.

Community
  • 1
  • 1
Elderry
  • 1,902
  • 5
  • 31
  • 45