0

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)`
Robbie
  • 1
  • 2
  • Care to post the error message? – DineshKumar May 03 '16 at 15:57
  • The execuation I produce just can work in my 64bit system,it does not have error.I just want to apply it into another computer whose system is 32bit,and it arises that the exe is not compatible with the system,the exe can not run. – Robbie May 06 '16 at 08:32
  • Based on your answer I assume, there could be one possibility of this error. If u have developed and packaged your code in python 64 bit and the other system has python 32 bit installed you may get this error. Just compare both the python versions. Then u may get a lead. – DineshKumar May 06 '16 at 10:23

1 Answers1

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?.

Xantium
  • 11,201
  • 10
  • 62
  • 89