简体   繁体   English

pyinstaller exe文件可在其他计算机上执行

[英]Pyinstaller exe single file executable on different computer

I am trying to make a gui to control a spectrum analyzer. 我正在尝试制作一个GUI以控制频谱分析仪。 The code works when running from the IDE. 从IDE运行时,该代码有效。 I generate an .exe unsing pyinstaller with the code. 我用代码生成一个.exe unsing pyinstaller。 pyinstaller.exe --onefile --windowed --icon=spec.ico spectrum_analyzer_gui.py The .exe works great on the computer that generated it. pyinstaller.exe --onefile --windowed --icon=spec.ico spectrum_analyzer_gui.py .exe在生成它的计算机上运行良好。

I tried to run the .exe on a different computer but got an error 'Failed to execute script spectrum_analyzer_gui' 我试图在另一台计算机上运行.exe,但出现错误“无法执行脚本Spectrum_analyzer_gui”

I copied the icon to the same location. 我将图标复制到了相同的位置。

What else do I need to do so the application runs on a different machine? 我还需要做什么才能使应用程序在其他计算机上运行?

I have attached a like to a .zip in dropbox with the source code and build. 我已经将类似的代码附加到带有源代码和构建的Dropbox中的.zip中。 https://www.dropbox.com/s/87uqynllnlv72c4/Spectrum%20Analyzer%20Gui.zip?dl=0 https://www.dropbox.com/s/87uqynllnlv72c4/Spectrum%20Analyzer%20Gui.zip?dl=0

尝试将--hidden-import=tkinter添加到您的exe代中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM