Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0 and PyQt5 import error: missing DLL #504

Closed
VegarS opened this issue Sep 11, 2019 · 10 comments
Closed

6.0 and PyQt5 import error: missing DLL #504

VegarS opened this issue Sep 11, 2019 · 10 comments

Comments

@VegarS
Copy link

VegarS commented Sep 11, 2019

I get an import error (missing DLL) with cx_Freeze 6 and PyQt5. Can be reproduced with the PyQt5 sample files:

bilde

Seems similar to #328, but the workaround there is not working.

Versions:
Python 3.7.3
PyQt5 5.13.0
cx_Freeze 6.0 (from pip/pypi)

@jpeg13
Copy link

jpeg13 commented Sep 11, 2019

Maybe you can get a workaround by manually copying the missing DLL (presumably MSVCP140.dll from Microsoft Visual C++ 2015 Redistributable package) into the PyQt5 subdirectory inside the build directory, or into the build directory itself. I get a similar error message with PySide and cx_Freeze 5.1.1 or 6.0 (but not 6.0b1), see my comment to #278.

@VegarS
Copy link
Author

VegarS commented Sep 11, 2019

It seems like several DLLs are missing from build\exe.win-amd64-3.7\PyQt5.

To get it working I made a build with cx_Freeze 5.1.1 and copied over the extra DLLs that 5.1.1 included in that directory: python3.dll, Qt5Core.dll, Qt5Gui.dll, Qt5Network.dll, Qt5Widgets.dll and VCRUNTIME140.dll

@marcelotduarte
Copy link
Owner

I tested the sample file on Linux and it worked. I will test on Windows later.

@marcelotduarte
Copy link
Owner

marcelotduarte commented Sep 12, 2019

I tested on Windows with py37-32. The workaround is to copy python3.dll to the directory where the executable was made. cx_Freeze copies python37.dll, but does not copy python3.dll. The vcruntime140.dll may also have to be copied when it no longer exists on the system. I will do a PR later.

@VegarS
Copy link
Author

VegarS commented Sep 12, 2019

I can confirm that copying python3.dll to the executable directory works.

@Berserker66
Copy link

Same deal on PySide2, python3.dll is missing there as well

@stephenmhall
Copy link

adding an include_files to the python3.dll solves you forgetting to copy it manually.

@tamenol
Copy link

tamenol commented Oct 8, 2019

I have the same issue. I downgraded to python3.5.4 and problem solved. cx_freeze could successfully make an .msi and it can run without errors.

@zkn365
Copy link

zkn365 commented Dec 6, 2019

“copy python3.dll to the directory where the executable was made” can solve my problem.
Python 3.7.4
PyQt5 5.13.0
cx_Freeze 6.0

@marcelotduarte
Copy link
Owner

cx_Freeze 6.1 has just been released.
Assuming this has been resolved.
If you had issues please re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants