-
Notifications
You must be signed in to change notification settings - Fork 67
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
Segmentation fault when importing python package #115
Comments
Thanks for the MWE, it makes it so much easier. My guess is that there is some incompatibility between LLVM versions, since Julia ships its own. It works for me, on Windows, but then it looks like the Windows distro of llvmlite doesn't bundle libllvm, whereas the Linux one does. What's the output of |
How did you install Julia? |
@cjdoris This is the output of
I've also added the full package list output by mamba during the @giordano I just installed the .dmg for macOS x86 from the official downloads page. |
Oh, and I just found a relevant issue in PyCall: JuliaPy/PyCall.jl#903 looks like probably the same issue, though @stevengj seems to think it should have been resolved long ago. I don't understand how these libraries are being loaded, but I really don't see how there could be a conflict if julia has long-since switched to using symbol versioning. Unfortunately, I also can't figure out how to look at for any symbol versioning in the |
This is beyond my expertise I'm afraid, though I can confirm I can reproduce the issue on Mac (but not Linux, WSL or Windows). |
It looks like this is a problem on the numba side. I don't know if there can be a better fix for this, but it turns out that this works when using numba with a version of llvmlite that is statically linked against LLVM. At the moment, this is not the case when you get numba from conda-forge (which most of us probably do). It looks like you can install either from pip, or from the numba channel — e.g., with Anyway, thanks for the help @cjdoris, and the nice packages. :) |
I maintain a python package that I wanted to use via PythonCall, but as soon as I try to import it, I get a segfault. I've never encountered such a problem when using it from python. And I can use the python binary installed as
.CondaPkg/env/bin/python
, and successfully import and use the package that way — but not so in julia withpyimport
. I've tried this in Julia 1.6.2 and 1.7.2, with the same result.I don't claim to understand the traceback, but it looks like it starts in libLLVM. The package being loaded does make pretty extensive use of
numba
, but I've also tried justpyimport("numba")
, and don't see such a segfault. FWIW, the python package was just updated and rebuilt with all the latest goodness on the python side. The only relevant thing I can find on the internet is this issue, which appears to be going the opposite direction (using julia from python), and doesn't reach any useful conclusions.Here is a MWE starting from an empty project:
Here is the list of packages conda installs (click to expand)
And here is the resulting segfault (click to expand)
Any help is much appreciated. Thanks!
The text was updated successfully, but these errors were encountered: