I’m using py2exe and I get the following errors in command prompt.
C:\Users\Me>C:\Python26\My_scripts\python.exe setup.py py2exe
C:\Python26\My_scripts\python.exe: can't open file 'setup.py': [Errno 2] No such
file or directory
What am I doing wrong?
Since your comment confirmed what I expected, I’ll follow up with an answer post.
You invoked python from the directory you were in when you called the executable. In this case, according to your prompt, you invoked it from
C:\Users\Me. Therefore, python is trying to findsetup.pyunder this directory (which doesn’t exist). You can either:1) Change directories to the location of the
setup.pyfile, then invoke python. The full path to the python executable will be necessary if it’s not in your PATH or if it’s in a different directory, otherwise it is not:2) Point python to the absolute path of
setup.py: