PyInstaller FrozenImporter has no attribute archive

本秂侑毒 提交于 2020-01-06 19:37:32

问题


Pyinstaller and py2exe seem to be always produce errors when trying to run. Even a simple test program that pops a blank window up fails to run.

PyInstaller error:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\python27\lib\site-packages\PyInstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py", line 270, in load_module
exec(bytecode, module.__dict__)
File "C:\Users\jammerxd\Desktop\VEXDisplayServer\build\test\out00-PYZ.pyz\wx", line 22, in <module>
File "c:\python27\lib\site-packages\PyInstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py", line 270, in load_module
exec(bytecode, module.__dict__)
File "C:\Users\jammerxd\Desktop\VEXDisplayServer\build\test\out00-PYZ.pyz\wx._core", line 2, in <module>
File "c:\python27\lib\site-packages\PyInstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py", line 270, in load_module
exec(bytecode, module.__dict__)
File "C:\Users\jammerxd\Desktop\VEXDisplayServer\build\test\out00-PYZ.pyz\wx._core_", line 15, in <module>
File "C:\Users\jammerxd\Desktop\VEXDisplayServer\build\test\out00-PYZ.pyz\wx._core_", line 7, in __load
AttributeError: 'FrozenImporter' object has no attribute 'archive'

And py2exe generates an exe but runtime error R6034 keeps popping up with something about not loading the C library correctly. How do I fix this error? All I want is to make an exe from a wxPython script that runs flawless in IDLE!


回答1:


The solution was to add the following in my application manifest:

<dependency>
<dependentAssembly>
    <assemblyIdentity
        type="win32"
        name="Microsoft.VC90.CRT"
        version="9.0.30729.4918"
        processorArchitecture="X86"
        publicKeyToken="1fc8b3b9a1e18e3b"
        language="*"
    />
</dependentAssembly>



来源:https://stackoverflow.com/questions/40900671/pyinstaller-frozenimporter-has-no-attribute-archive

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