kame
kame

Reputation: 21960

Python: Can't use the command python

I want to install summon-module on windows 7. I tried

python setup.py install

but cmd doesn't know the command "python".

I also set the path correctly. What is the problem? Thanks in advance.

Upvotes: 0

Views: 361

Answers (3)

GreenMatt
GreenMatt

Reputation: 18580

Add the directory with the python.exe to your path via Control Panel -> System -> Advanced -> Environment Variables. Then scroll through the System variables listed in the lower part of the screen, highlight "Path", and click edit. Add (don't replace!) the directory to that variable, probably at the end. Make sure there's a semi-colon (';')between it and the entries in front of and (if appropriate) behind it; I recommend putting a semi-colon at the end even if it's the last value. Once you've done this, click the Ok button on the environment variables dialog box and start a new commend shell. You can type path at the prompt to get the path displayed so you can confirm that the python directory has been added.

Upvotes: 3

jcdyer
jcdyer

Reputation: 19145

PATH needs to point to the directory your python.exe is in, or it needs to be in the current directory, or you need to specify the full path.

PYTHONPATH needs to point to the directory your setup.py is in, or it needs to be in the current directory, or you need to specify the full path.

Upvotes: 4

user177800
user177800

Reputation:

on windows it is python.exe and you need the path to the executable added to your environment or to use the fully qualified path

Upvotes: 0

Related Questions