Cannot convert Python script into an executable using Pyinstaller: Empty dist folder & PyQt5 not found

断了今生、忘了曾经 提交于 2020-01-10 05:58:05

问题


I am using PyInstaller to create a stand-alone executable file from my Python script. The Python script was created by Python 3.7.1 and I use Anaconda.

When I run Pyinstaller, it creates a .spec file and build and dist folders. However, the dist folder is empty.

No errors were reported by Pyinstaller apart from "cannot find existing pyqt5 plugin directories".

How can I solve this problem? Or how I can troubleshoot it so I can understand where the problem is?


回答1:


After several hours reading different threads I have finally found an acceptable solution.

I added:

--exclude-module PyQt5

to exclude PyQt5 since my scrip doesn't use it. The exe is created.

Hope it can help someone.



来源:https://stackoverflow.com/questions/55369108/cannot-convert-python-script-into-an-executable-using-pyinstaller-empty-dist-fo

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