anaconda - path environment variable in windows

Alejandro Simkievich picture Alejandro Simkievich · Dec 1, 2015 · Viewed 270.1k times · Source

I am trying to run python from the windows command prompt (windows 10). So the result is the typical one when the path environment variable is not configured

 c:\windows\system32>python
'python' is not recognized as an internal or external command, operable
 program or batch file

however, I am not sure which is the right directory I should set up in the path variable.

I tried a few variations, and none of them work, including:

c:\users\xxx\anaconda3
c:\users\xxx\anaconda3\Scripts
c:\users\xxx\anaconda3\libs\python34

and none of them works.

Does anyone have experience with this particular system constellation (windows, anaconda). Thanks.

Answer

Alejandro Simkievich picture Alejandro Simkievich · Dec 1, 2015

it turns out I was mistaken.

Solution is: in anaconda (as well as in other implementations), set the path environment variable to the directory where 'python.exe' is installed.

As a default, the python.exe file in anaconda is in:

c:\.....\anaconda

after you do that, obviously, the python command works, in my case, yielding the following.

python
Python 3.4.3 |Anaconda 2.2.0. (64|bit)|(default, Nov 7 2015), etc, etc