py2exe, problems [duplicate]
I tried all the steps in this tutorial.
Yet I keep geting this ouput
'python' is not recognized as an internal or external command operable program or batch file.
when I run
python setup.py py2exe
in command prompt
What am I doing wrong?
python.exe
is missing in your path. Try to reinstall Python with admin rights or manually add C:\PythonXX\ to your path.
You can also just type out the full path to Python in the command prompt:
c:\pythonXX\python.exe setup.py py2exe
This was happening to e and it was making me soo mad
what i did was go to Start>run and run C:\Python27\python setup.py py2exe
and if your setup.py is in your python directory it should work
the above answer should work but its sometimes especially on a computer with locked down privileges that don't let you mess with path to just use a batch script or even a gui such as GUI2EXE
Assuming you're on Windows, go to:
start > control panel > system and security > system >advanced system settings
Now click environment variables, then the new
button under system variables. Set the variable name to PATH
(yes, caps. No quotes) and the value to the path of the Python folder under which Python is installed. For me, for example, it is C:\python27
.
However, if the installation was user specific it will look more like C:\USER\python27
. USER is, of course, filled in with your user account's name.
The number after the name python
as the path value will be determined by the version of Python you have.
精彩评论