cx_Freeze和Python 3.4 [英] cx_Freeze and Python 3.4
问题描述
我可以在Windows 64位系统中使用cx_freeze正确生成可执行文件。但是,当我要在Windows 32位系统中使用可执行文件时,它无法工作,如何在其他32位系统的计算机上使用该可执行文件。 p>
I can properly produce an executable using cx_freeze in windows 64bit system.But when I want use the executable in windows 32bit system,it can not work,how can I make it available in other computer whose system is 32bit.`
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
#base = "Win32GUI"
base = "Console"
exe = [Executable(script = r'E:\programming\python\lx\sange\test_GUI.py',
base = base,
targetName = 'test.exe')]
setup( name = "guifoo",
version = "0.1",
description = "My GUI application!",
executables = exe)`
推荐答案
x32位计算机无法运行x64应用程序(这是您出错的原因)。
x32 bit computers cannot run x64 applications (This is the reason for your error).
我确定cx_Freeze正在以x64位版本编译您的exe。
I am sure cx_Freeze is compiling your exe in x64 bit version.
解决方案是在x32计算机上编译它,或者(可能我自己没有对此进行测试)使用x32版本的python(和cx_Freeze)(我认为您正在使用x64版本的Python),如本帖子所建议:
The solution is either to compile it on a x32 computer or (possibly I have not tested this myself) to use a x32 version of python (and cx_Freeze) (I assume you are using an x64 version of Python) as suggested by this post:
如果我有64位操作系统,可以用cx_freeze制作32位程序吗? / a>。
Can I make a 32 bit program with cx_freeze if I have a 64 bit OS?.
这篇关于cx_Freeze和Python 3.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!