1

I am following the the tutorial at http://www.py2exe.org/index.cgi/Tutorial to figure out how to use py2exe. I get down to step 3 where you are supposed to run the command:

python setup.py py2exe

I do that and then I get this error:

'python' is not recognized as an internal or external command,
operable program or batch file.

I have python 2.4 installed on my machine. any idea's? I am sure it is something simple.

4
  • Please fix your title "getting py2exe to work" is not informative at all. "Python not installed" is a much more informative title. Commented Jun 8, 2010 at 17:00
  • 1
    The title "Python not installed" would be portraying false information seeing that I have python 2.4 installed. Commented Jun 8, 2010 at 17:12
  • 1
    Please pay attention. "getting py2exe to work" is a TERRIBLE question title. Please fix it. Almost anything would be better. You could create something worse, but I can't see how. PLEASE update your question to have a title which OTHER PEOPLE might see, and then learn from. "getting py2exe to work" is guaranteed to be ignored. Your problem, and the answer you accepted, COULD help other people -- if only you would fix the title. Please fix the title. Please. Commented Jun 10, 2010 at 23:01
  • Because your question isn't specific to py2exe you should rename it to something about the error message, possibly just quoting the beginning of the error: 'python' is not recognized Commented Apr 1, 2011 at 18:07

2 Answers 2

2

Python just isn't on your path. If you indeed have Python 2.4, it should be C:\Python24\python.exe with the default installer.

Wherever the file is located, if you don't set Python's folder in your path, you will write the command as

C:\Python24\python.exe setup.py py2exe

(or whatever the correct path is).

Depending on how your installation was configured, you might be able to just do

setup.py py2exe

since Windows might automatically associate *.py files with Python.

You might want to also read "Finding the Python Executable" from the Python documentation.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I new it was something simple.
0

You need to add python to your system path. This is done differently on different OSs. Instructions for most versions of Windows You need to add C:\Python24 or whereever python is on your computer.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.