Pyinstaller Package Error: failed to execute script main [How to Solve]

When packaging, replace the code with: pyinstaller --hidden-import=pkg_resources -F main.py Can succeed.

It was originally designed to hide the code window during packaging. The absolute path was used. This problem was solved after changing to the above code.

Usage: pyinstaller38 --hidden-import=pkg_resources -F -w -i m4.ico main.py

Similar Posts: