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
Importing numba causes numpy to segfault in frozen application #3451
Comments
Please run strace using
gdb would definitively be best :-) (I can't see how what you linked is to running the exe bundled by PyiInstaller, though.) |
I am also experiencing this exact same issue. My program works as expected when run in IDE, however 3x3 or greater matrix multiplication crashes the program after it has been compiled with pyinstaller. Weirdly, it seems to work with 2x2 multiplication. I have tested with using the @ symbol, and also using np.matmul() and np.dot() and all have the same effect. |
@HennersBro98 What OS are you using? And are you also using a conda environment, like the original report? |
Windows 10, and yes I am using a conda environment. I am not using numba, but the same issue occurs at the matrix multiplication. |
Can you try using branch from #5168 to see if that fixes the issue with numpy under conda? I.e., uninstall the installed pyinstaller, then install the PR's branch via If that does not help, please post additional details: version of numpy, version of pyinstaller, and the error message you get from the program when it crashes. Since you're on Windows and not on linux, I doubt you are experiencing a segfault like the original poster... |
Ughh I've seen this one too many times. See here. |
Thanks @bwoodsend , worked perfectly! |
@HennersBro98 Could you also try the patch PR as requested by @rokm? I should also warn you that although that particular dll is no longer missing, there are an extensive list of other missing dlls just like this except that, as they come with a lot of common programming tools, you probably already have them in We are in the process of moving the numpy hooks to numpy's repo where hopefully Conda will pick it up and maintain the list of required binaries. But for now, I strongly recommend that you consider Conda + numpy + PyInstaller incompatible. Using |
That patch does not seem to work, I get: |
@HennersBro98 Can we have the details please? Is it runtime or buildtime? What's the full error message? |
Oh, and did you remember to use the |
Using the version of pyinstaller as requested by @rokm: 4.1.dev0 I'm unsure why it is repeating the first couple of terms in the path, it did not produce this error in your workaround. |
Apologies, just updated to latest version of numpy (v1.19.2) and the above error is no longer persiting. It also fixes the original numpy matrix multiplication error, thanks! |
The following python code segfaults when the frozen application is run:
The segfault occurs occurs on the matrix multiplication with @.
The un-frozen code runs as expected.
I am both building and running the frozen code within the same conda environment, on the same machine.
I haven't been able to reproduce this using the git version because I'm unable to run it. I'll try again later and file a separate request for that.
$ cat /etc/issue
Ubuntu 16.04.4 LTS
awagner@tars:/home/awagner/private/deployment_testing
$ pyinstaller --version
3.3.1
I don't have a backtrace since my system gdb is screwed up.
strace output:
strace_output.txt
The text was updated successfully, but these errors were encountered: