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.0b1 PyQt5 dll not found #328

Closed
dhenryFabrice opened this Issue Nov 19, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@dhenryFabrice

dhenryFabrice commented Nov 19, 2017

Hi,

I have some issue with PyQt5 since the DLL do not seems to be "loadable":
from PyQt5 import QtCore, QAxContainer
ImportError: DLL load failed: Le module spécifié est introuvable.

I'm using python 3.6.

Is this due to a bug or do I need to set things differently as before?

Best regards.

@dhenryFabrice

This comment has been minimized.

dhenryFabrice commented Dec 6, 2017

If found a work around: the DLL where not found when the exe was started from a different folder than the exe location, so I added thoses lines:

if getattr(sys, 'frozen', False):
basedir = os.path.dirname(sys.executable)
else:
basedir = os.path.dirname(file)
os.chdir(basedir) #---> it failes to find PyQt when freezed if the process is not located in the exe folder

Best regards

anthony-tuininga added a commit that referenced this issue Dec 9, 2017

Copy dependent files to the same directory as the file it depends on,…
… not the

root directory; also add a sample for PyQt5 to demonstrate its correct use
(#328).
@anthony-tuininga

This comment has been minimized.

Owner

anthony-tuininga commented Dec 9, 2017

I believe I have corrected this issue and potentially other similar ones. I have also added a sample for PyQt5.

anthony-tuininga added a commit that referenced this issue Dec 9, 2017

Copy dependent files to the same directory as the file it depends on,…
… not the

root directory; also add a sample for PyQt5 to demonstrate its correct use
(#328).
@dhenryFabrice

This comment has been minimized.

dhenryFabrice commented Dec 10, 2017

Hi,

Yes this one works well, I do not need the workaround anymore!

Many thanks!

@anthony-tuininga

This comment has been minimized.

Owner

anthony-tuininga commented Dec 16, 2017

You're welcome. cx_Freeze 5.1.1 was just released with this fix included in it. A corresponding release for 6.0 will be released soon as well. I'd like to address one other issue first.

@Siecje

This comment has been minimized.

Siecje commented Dec 18, 2017

I'm just curious, why was the atexit include required?

cebdef5#diff-6c1471b0fbc40b4475afeb6014e6e276R23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment