尽管使用了不同的库,但我发现this question存在一个非常相似的问题。
当我尝试运行.exe时,使用PyInstaller 3.4
进行构建时,我收到此错误,无法解决:
Traceback (most recent call last):
File "Clustering_Dash_0_7_igraphimplementation.py", line 622, in <module>
File "site-packages\dash\dash.py", line 1385, in run_server
File "site-packages\dash\dash.py", line 1279, in enable_dev_tools
File "site-packages\dash\dash.py", line 1277, in <listcomp>
AttributeError: 'FrozenImporter' object has no attribute 'filename'
[17336] Failed to execute script Clustering_Dash_0_7_igraphimplementation
我试图将推荐的编辑内容复制并粘贴到.exe清单中,但是并不能解决我的问题。
我的清单目前是这样的:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Clustering_Dash_0_7_igraphimplementation" processorArchitecture="amd64" type="win32" version="1.0.0.0"/>
<dependency>
<dependentAssembly>
<assemblyIdentity language="*" name="Microsoft.Windows.Common-Controls" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" type="win32" version="6.0.0.0"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"/>
</dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>
从所提问题到此清单的建议添加如下:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.30729.4918"
processorArchitecture="X86"
publicKeyToken="1fc8b3b9a1e18e3b"
language="*"
/>
</dependentAssembly>
也许我将此块粘贴到了错误的位置,但是我尝试了多个位置,并且每次应用程序启动失败。