简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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