2016-12-01 27 views
0

Pyinstaller和py2exe在嘗試運行時似乎總是產生錯誤。即使是一個彈出空白窗口的簡單測試程序也無法運行。PyInstaller FrozenImporter沒有屬性存檔

PyInstaller錯誤:

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' 

而且py2exe生成一個可執行文件,但運行時錯誤R6034保持與一些有關不正確加載C庫彈出。 我該如何解決這個錯誤?我只需要從一個在IDLE中完美運行的wxPython腳本創建一個exe文件!

回答

0

解決的辦法是添加以下在我的應用程序清單:

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