简体   繁体   English

py2exe / pyinstaller:执行失败

[英]py2exe/pyinstaller: execution failure

I programmed a simple, little game with wxpython and created an .exe of it with py2exe (and in a 2nd try with pyinstaller). 我使用wxpython编写了一个简单的小游戏,并使用py2exe创建了一个.exe(并在pyinstaller中进行了第二次尝试)。 I also programmed an installer which just creates a folder and copies all the game files into this folder. 我还对安装程序进行了编程,该安装程序仅创建一个文件夹并将所有游戏文件复制到该文件夹​​中。 I also created an .exe for this installer. 我还为此安装程序创建了一个.exe。 Everything works fine on Windows 7. But on Windows XP i get this problem: My installer.exe succesfully works, but when I start the .exe from my game then I get this error: 在Windows 7上一切正常。但是在Windows XP上却出现此问题:我的installer.exe成功运行,但是当我从游戏中启动.exe时,出现此错误:

foo.exe is not a valid win32 application foo.exe不是有效的win32应用程序

I use python 2.7 我使用python 2.7

Is the Windows 7 box you're using to create the installer 64-bit? 您用来创建安装程序的Windows 7盒是否为64位? Is the Python version you were using on Windows 7 64-bit? 您在Windows 7 64位上使用的Python版本吗? If so, then you'll need to create the exe using a 32-bit Python, 32-bit wxPython and 32-bit installer. 如果是这样,则需要使用32位Python,32位wxPython和32位安装程序来创建exe。

A 64-bit program will run just fine on a 64-bit system, but it won't work on a 32-bit one. 64位程序可以在64位系统上正常运行,但不能在32位系统上运行。 However, a 32-bit program will run on both. 但是,一个32位程序将在两者上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM