问题
I found this question having a quite similar issue, despite using a different library.
When I try to run my .exe, build using PyInstaller 3.4
I am getting this error, which I'm unable to solve:
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
I tried to copy and paste the recommended edit to the .exe manifest but it didn't solve my problem.
My manifest looks like this at the moment:
<?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>
The suggested add to this manifest from the referenced question is the following:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.30729.4918"
processorArchitecture="X86"
publicKeyToken="1fc8b3b9a1e18e3b"
language="*"
/>
</dependentAssembly>
Maybe I pasted this block to the wrong place, but I tried several places and everytime the application start failed.
来源:https://stackoverflow.com/questions/56288489/pyinstaller-frozenimporter-has-no-attribute-filename