Search code examples
pythonwindowsarchitecturepy2exe

executable made with py2exe doesn't run on windows xp 32bit


I created an executable with py2exe on a 64bit windows 7 machine, and distributed the program.

On a windows xp 32bit machine the program refuses to run exhibiting the following behavior:

a popup window says: program.exe is not a valid win32 application.

The command prompt window says "access denied"

I checked for permissions and the user has full control and complete ownership of the file and its parent directories. So that can't be the issue.

The only feasible possibility I can image is an OS/architectural incompatibility. How should I fix this?

My setup.py file used to generate the executable:

from distutils.core import setup
import py2exe

setup(console=['xerxes2excel.py'])

I ran the following to generate the exe:

python setup.py py2exe

Solution

  • I think you just need to install 32-bit python and 32-bit py2exe on your machine.... see Can 64-bit python create 32-bit Windows executables