ImportError: no module named py2exe

Seems like you need to download proper py2exe distribution.

Check out if your c:\Python26\Lib\site-packages\ contains py2exe folder.


Sounds like something has installed Python 2.4.3 behind your back, and set that to be the default.

Short term, try running your script explicitly with Python 2.6 like this:

c:\Python26\python.exe setup.py ...

Long term, you need to check your system PATH (which it sounds like you've already done) and your file associations, like this:

C:\Users\rjh>assoc .py
.py=Python.File

C:\Users\rjh>ftype Python.File
Python.File="C:\Python26\python.exe" "%1" %*

Simply removing Python 2.4.3 might be a mistake, as presumably something on your system is relying on it. Changing the PATH and file associations to point to Python 2.6 probably won't break whatever thing that is, but I couldn't guarantee it.

Tags:

Python

Py2Exe