cx_Freeze and Python 3.4

人盡茶涼 提交于 2019-12-12 06:28:19

问题


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)`

回答1:


x32 bit computers cannot run x64 applications (This is the reason for your error).

I am sure cx_Freeze is compiling your exe in x64 bit version.

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:

Can I make a 32 bit program with cx_freeze if I have a 64 bit OS?.



来源:https://stackoverflow.com/questions/37006477/cx-freeze-and-python-3-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!