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

INTEL MKL ERROR: dlopen(/Users/user/opt/anaconda3/lib/libmkl_intel_thread.dylib, 9): Library not loaded: @rpath/libiomp5.dylib #895

Open
truedichotomy opened this issue Apr 19, 2021 · 7 comments

Comments

@truedichotomy
Copy link

I'm encountering a crash of julia when trying to use PyCall.jl.

I installed anaconda then set ENV["PYTHON"] to the anaconda python, rebuild PyCall then when I try to do a simple plt = pyimport("matplotlib.pyplot"), Julia crashes. Here is the full error message:

INTEL MKL ERROR: dlopen(/Users/user/opt/anaconda3/lib/libmkl_intel_thread.dylib, 9): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Users/user/opt/anaconda3/lib/libmkl_intel_thread.dylib
  Reason: image not found.
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.

I checked the anaconda directories and libmkl_intel_thread.dylib and libiomp5.dylib are both present.

I'm running Julia 1.6.0 on macOS 10.15.7.

@truedichotomy
Copy link
Author

This may be related to issue #891.

@truedichotomy
Copy link
Author

If I use Conda.jl inside Julia. I still encounter the same issue eventhough the libraries are present in those directories:

julia> plt = pyimport("matplotlib.pyplot")
INTEL MKL ERROR: dlopen(/Users/user/.julia/conda/3/lib/libmkl_intel_thread.dylib, 9): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Users/user/.julia/conda/3/lib/libmkl_intel_thread.dylib
  Reason: image not found.
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.

@tk3369
Copy link

tk3369 commented May 9, 2021

I have replicated the exact same issue, as reported by someone as well on the Humans of Julia Discord server. @truedichotomy were you able to work around this issue?

@m-elder
Copy link

m-elder commented May 11, 2021

I had the exact same bug but using NEURON, and managed to resolve it just by updating anaconda, using

conda update --all

hope this helps!

@gideonsimpson
Copy link

I'm having this same issue too. I have a (mini)conda installation that, independently of PyCall I am happy with, as it has FEniCS working properly, but I would like to be able to use PyCall with it. After a bit of testing, I get the MKL error on numpy, matplotlib, scipy, etc; numpy seems to be the core problem.

@mjohnson541
Copy link

I resolved this issue in my own installs by installing nomkl in the conda environment. I'm not very familiar with MKL, but it seemed like this was being caused by some interaction between Julia and conda's separate MKL installs.

@terasakisatoshi
Copy link

The following issues might be helpful for those who came here.

JuliaPy/PyPlot.jl#315
#921

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

6 participants