用 py2exe 制作的可执行文件不能在 windows xp 32bit 上运行 [英] executable made with py2exe doesn't run on windows xp 32bit
问题描述
我在 64 位 Windows 7 机器上使用 py2exe 创建了一个可执行文件,并分发了该程序.
I created an executable with py2exe on a 64bit windows 7 machine, and distributed the program.
在 windows xp 32 位机器上,程序拒绝运行,表现出以下行为:
On a windows xp 32bit machine the program refuses to run exhibiting the following behavior:
一个弹出窗口说:program.exe is不是有效的 win32 应用程序.
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?
我的 setup.py 文件用于生成可执行文件:
My setup.py file used to generate the executable:
from distutils.core import setup
import py2exe
setup(console=['xerxes2excel.py'])
我运行以下命令来生成 exe:
I ran the following to generate the exe:
python setup.py py2exe
推荐答案
我认为你只需要在你的机器上安装 32 位 python 和 32 位 py2exe.... 见 64 位 python 能否创建 32 位 Windows 可执行文件
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
这篇关于用 py2exe 制作的可执行文件不能在 windows xp 32bit 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!