Cx-Freeze Error - Python 34

2019-03-18 12:44发布

I have a Cx_Freeze setup file that I am trying to make work. What is terribly frustrating is that it used to Freeze appropriately. Now, however, I get the following error:

edit. the error that shows up is not a Python exception through the console, but a crash report when attempting to launch the resulting exe file generated through the freeze.

'File 'notetest.py', line 1, in _find_and_load importlib_bootstrap.py, line 2214

....

AttributeError 'module' object has no attribute '_fix_up_module'

My setup.py file follows:

    import sys
import os
from cx_Freeze import setup, Executable

build_exe_options = {'packages': [], 'excludes' : []}
base = 'Win32GUI'
exe = Executable(
    script = 'notetest.py',
    initScript = None,
    base = 'Win32GUI',
    targetName = 'MedicaidAid.exe',
    compress = True,
    appendScriptToExe = True,
    appendScriptToLibrary = True,
    icon = None
)

setup( name = 'MedicaidAid', 
        version = '0.85',
        description = 'MedicaidAid Software',
        options = {'build_exe': build_exe_options},
        executables = [Executable('notetest.py', base = base)])

3条回答
再贱就再见
2楼-- · 2019-03-18 13:23

You should install cx_freeze from this site. It contains an important patch that solves the problem (see this discussion for detailed).

查看更多
一纸荒年 Trace。
3楼-- · 2019-03-18 13:26

Apparently this is a known issue with Cx_Freeze. BitBucket.

Apparently there is a compiling error that occurs. The bitbucket link lists the work-arounds.

查看更多
戒情不戒烟
4楼-- · 2019-03-18 13:32

I had the same issue and the solution by Northcat worked just perfectly. The issue of missing patch in the other cx_freeze came into picture while installing(some alert messages were thrown) it. It is this missing patch because of which the alerts were given. The new installation from this link had no such alerts while installing and it so worked fine.

查看更多
登录 后发表回答