-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
PyInstaller executable with matplotlib cannot find _cext DLL #168
Comments
I have no personal experience with PyInstaller but is it possible it somehow forgot to package the compiled dll for kiwi ? That's how I read error message. |
As far as my expertise goes in this regard, it seems to be the other way around: only the pyd (_cext.cp311-win_amd64.pyd) is present. I'm not entirely sure what to try next and if this is even the problem of kiwisolver or perhaps of PyInstaller instead. This paragraph on the pyinstaller wiki may be related: https://pyinstaller.org/en/v5.13.2/when-things-go-wrong.html#listing-hidden-imports. It seems that, generally, pyinstaller leaves it up to other packages to contribute their own hooks so that packages can be frozen properly, but this could also be an issue on their end. |
Kiwi has no hidden imports. Could you post the content of the kiwi package in the install created by PyInstaller ? |
Just to clarify: I cannot completely view the results of builds as I run PyInstaller with --onefile, which creates a single self-contained exectuable. My findings about the package contents regard those when I use PyInstaller without the --onefile option. That being said, the installed package contains a kiwisolver folder with inside it only the file "_cext.cp311-win_amd64.pyd". Another perhaps useful thing me and a colleague discovered in the meantime is the following: when I place msvcp140.dll next to my executable, it does run fine. This suggests that that dll is not properly included when freezing my project with PyInstaller. |
This is weird on several level:
|
I'm not really sure how to proceed with this. My personal runtime problem is solved by manually including the msvcp140.dll in the PyInstaller build, but I do not think that is a satisfying solution for this situation. The way I see it now the desired solution would be either of the following:
But maybe I'm overlooking something, let me know what you think. |
I used PyInstaller 5.13.2 to create an executable that uses Matplotlib 3.7.3 (and therefore also Kiwisolver 1.4.5).
This creates an executable that runs fine on my developer computer, but crashes on the _cext DLL import on another machine:
I'm not sure what other information I can provide that could be useful here. Let me know if you need to know anything else.
The text was updated successfully, but these errors were encountered: