python - cx_Freeze error when converting .py to .exe -
so have been looking everywhere ways convert .py .exe, such py2exe , cx_freeze. have gotten cx_freeze close working, have gotten error , don't know how fix , don't see posted anywhere online. know error and, more importantly, easiest way fix it? trying convert simple program called catanimation.py test, has picture involved called cat.png. in folder called "attempt" on desktop. here screenshot of folder, files, , command prompt error: click here.
i have code written here:
#this setup.py import cx_freeze executables = [cx_freeze.executable("catanimation.py")] cx_freeze.setup( name="cat animation", options={"build_exe": {"packages":["pygame"], "include_files":["cat.png"]}}, executables = executables )
here command prompt information:
c:\users\nick\desktop\attempt>setup.py build running build running build_exe traceback (most recent call last): file "c:\users\nick\desktop\attempt\setup.py", line 10, in <module> executables = executables file "c:\python27\lib\site-packages\cx_freeze\dist.py", line 362, in setup distutils.core.setup(**attrs) file "c:\python27\lib\distutils\core.py", line 152, in setup dist.run_commands() file "c:\python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) file "c:\python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() file "c:\python27\lib\distutils\command\build.py", line 127, in run self.run_command(cmd_name) file "c:\python27\lib\distutils\cmd.py", line 326, in run_command self.distribution.run_command(command) file "c:\python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() file "c:\python27\lib\site-packages\cx_freeze\dist.py", line 231, in run metadata = metadata) file "c:\python27\lib\site-packages\cx_freeze\freezer.py", line 130, in __init__ n in self._getdefaultbinpathexcludes() + binpathexcludes] file "c:\python27\lib\site-packages\cx_freeze\freezer.py", line 270, in _getde faultbinpathexcludes import cx_freeze.util importerror: dll load failed: %1 not valid win32 application. c:\users\nick\desktop\attempt>
i using python 3.4.0 pygame , cx_freeze. please me figure out problem , how fix can make python games executable files cx_freeze! in advance if reply!!
alright, figured out. confused between 32 , 64 because had older versions of python installed, , upon removing them 3.4 left, , copying 3.4 files filder setup.py, command prompt python setup.py build worked!
Comments
Post a Comment