Skip to content

INTEL MKL ERROR on MacOS #182

Closed
Closed

Description

@OkonSamuel

Hi.
I get the following error in travis tests when using Conda on MacOS

INTEL MKL ERROR: dlopen(/Users/travis/.julia/conda/3/lib/libmkl_intel_thread.dylib, 9): Library not loaded: @rpath/libiomp5.dylib

  Referenced from: /Users/travis/.julia/conda/3/lib/libmkl_intel_thread.dylib

  Reason: image not found.

Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.

I don't get these error on Linux or when i use my local python distribution (That's why am opening an issue here). No error shows if i remove mkl with Conda.rm("mkl")
Any help would be appreciated. Thanks

Activity

  1. stevengj commented on May 26, 2020

    @stevengj
    Member

    Can you give a self-contained example that illustrates the error? What is the test that is failing?

  2. OkonSamuel commented on May 26, 2020

    @OkonSamuel
    Author

    Thanks @stevengj
    Sorry for my choice of words. I should have said errored tests. https://travis-ci.com/github/alan-turing-institute/MLJModels.jl/jobs/339809727#L470. This is as a result of using PYTHON=conda as default python distribution on MacOS(This doesn't error in Linux build)

  3. OkonSamuel commented on May 26, 2020

    @OkonSamuel
    Author

    Although adding the following code to my tests prevents those errors am still puzzled why it doesn't error in Linux builds.

    Conda.add("nomkl")
    Conda.add("scikit-learn")
    Conda.rm("mkl")
    
  4. ppalmes commented on Nov 18, 2020

    @ppalmes

    add this in your .travis.yml

    env:
      - PYTHON=Conda LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.julia/conda/3/lib
    

    the problem is the env variable is not properly set to the right location in MacOS

  5. ppalmes commented on Nov 18, 2020

    @ppalmes

    can we have a fix on this in MacOS? for those with conda/python working, this is issue won't bite them. from fresh .julia or new install of conda/pycall, without properly exporting:

    export PYTHON=Conda
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.julia/conda/3/lib
    

    in their startup shell, installing conda/python will fail.

  6. mertsaner commented on Apr 4, 2021

    @mertsaner

    add this in your .travis.yml

    env:
      - PYTHON=Conda LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.julia/conda/3/lib
    

    the problem is the env variable is not properly set to the right location in MacOS

    Hi there,
    I have the same problem in my Macbook but I did not understand what to do exactly. What is our .traves.yml? My username is mertsaner. So, what is .mertsaner.yml? Could you describe in a detailed way what we need to do solve the problem? Thanks,

  7. mertsaner commented on Apr 4, 2021

    @mertsaner

    can we have a fix on this in MacOS? for those with conda/python working, this is issue won't bite them. from fresh .julia or new install of conda/pycall, without properly exporting:

    export PYTHON=Conda
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.julia/conda/3/lib
    

    in their startup shell, installing conda/python will fail.

    I have tried to write these two to the my shell but it did not worked out

  8. ppalmes commented on Apr 4, 2021

    @ppalmes

    you have to do Pkg.build() so that Conda and PyCall will use these new information.

  9. ppalmes commented on Apr 4, 2021

    @ppalmes

    export PYTHON=Conda export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.julia/conda/3/lib

    in julia prompt:
    using Pkg; Pkg.build()

  10. mertsaner commented on Apr 4, 2021

    @mertsaner

    Screen Shot 2021-04-04 at 3 37 46 PM

    Same Error :(

  11. mertsaner commented on Apr 4, 2021

    @mertsaner

    It happens when I use Pyplot otherwise it is okay, I use BigSur 11.2.3 on M1 Macbook

  12. ppalmes commented on Apr 4, 2021

    @ppalmes

    check on that directory if you have the mkl lib. find it and put it there.

  13. ppalmes commented on Apr 4, 2021

    @ppalmes

    you can also remove mkl by using nomkl

    Conda.add("nomkl")
    Conda.rm("mkl")
    pyimport_conda("mkl", "mkl")
    
  14. ppalmes commented on Apr 4, 2021

    @ppalmes
    Screen Shot 2021-04-04 at 3 37 46 PM

    Same Error :(

    make sure you export those commands in the same terminal and run julia and build the packages.

  15. mertsaner commented on Apr 11, 2021

    @mertsaner
    Screen Shot 2021-04-04 at 3 37 46 PM Same Error :(

    make sure you export those commands in the same terminal and run julia and build the packages.

    I tried but, it did not work correctly, something is wrong with Julia but I do not what is

  16. mertsaner commented on Apr 11, 2021

    @mertsaner

    Pluto is okay, since even I do not use Pluto, it gives same error within Julia every time, I try to plot something or write Pyplot()

  17. mertsaner commented on Apr 11, 2021

    @mertsaner

    like using Pkg, Add PyPlot()

  18. ppalmes commented on Apr 11, 2021

    @ppalmes

    did you follow the steps about exporting PYTHON and LD_LIBRARY paths? did you check if MKL lib can be found in the location that the error indicated? please provide more details and more info. if you don’t provide details, we cannot guess too what is the problem.

  19. ppalmes commented on Apr 11, 2021

    @ppalmes

    what is your julia version. try running these commands in julia shell to avoid any issues from other packages.

  20. ppalmes commented on Apr 11, 2021

    @ppalmes

    did you try the Conda commands suggested above?

  21. deszoeke commented on Jul 22, 2021

    @deszoeke

    I had to do some tugging to get GR to compile, after which I got this PyPlot error. The Conda commands worked.

  22. ViralBShah commented on Oct 20, 2025

    @ViralBShah
    Collaborator

    Please open a new issue if still a problem.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions