2

I have just installed Python on my Windows 7. I thought that after that I will be able to run python on the command prompt but it is not the case. After the installation I also found out that I can run the python command shell. This is nice. But what should I do if I want to save my program in a file and then I want to run this program (in Linux, for example, I typed "python file_name.py" in the command line).

3 Answers 3

2

You need to add the python bin directory to your path. Follow the instructions here and add c:\python26\bin to the path (unless you installed python in a non-default location).

2
  • Thanks for the help. I just need to add that python started to work from the command prompt when I use "c:\Python26" instead "c:\python\bin".
    – Roman
    Feb 22, 2010 at 13:49
  • Also thanks for the link to the instructions for changing the environment variables.
    – Roman
    Feb 22, 2010 at 13:49
0

Is python.exe in your windows path? Try to look at the PATH environment variable and see if the installation folder of python is listed there.

0

You need to update your environment variables to include the path to the Python executable.

On XP you can do this by right clicking on "My Computer" -> Properties and then going to the "Advanced" tab.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.