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

MKL ERROR #81

Open
kbjarnason opened this issue May 29, 2020 · 13 comments
Open

MKL ERROR #81

kbjarnason opened this issue May 29, 2020 · 13 comments

Comments

@kbjarnason
Copy link

Using SKL caused a MKL Error for me, had to uninstall MKL to use it, would be great to fix this for the future.

@OkonSamuel
Copy link
Collaborator

@kbjarnason thanks for reporting.
We are aware of this issue. For now MacOS users would have to use non-mkl versions of scikit-learn.
We would automate this in the build process so that new users won't have to do this manually.

@cstjean
Copy link
Owner

cstjean commented May 29, 2020

@kbjarnason Which OS are you on?

@kbjarnason
Copy link
Author

kbjarnason commented May 29, 2020 via email

@azev77
Copy link

azev77 commented Jun 21, 2020

Continuing from JuliaAI/MLJ.jl#565

I have the latest version of ScikitLearn.jl:

julia> using ScikitLearn
julia> ScikitLearn.Skcore.import_sklearn()
INTEL MKL ERROR: dlopen(/Users/AZevelev/.julia/conda/3/lib/libmkl_intel_thread.dylib, 9): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Users/AZevelev/.julia/conda/3/lib/libmkl_intel_thread.dylib
  Reason: image not found.
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.dylib.

What exactly are the steps I should take?

@OkonSamuel
Copy link
Collaborator

@azev77 are you running julia in some form of container?. Could you please do Pkg.status()

@azev77
Copy link

azev77 commented Jun 21, 2020

julia> Pkg.status()
Status `~/.julia/environments/v1.4/Project.toml`
  [f20549b4] AlphaStableDistributions v1.0.0 #master (https://github.com/org-arl/AlphaStableDistributions.jl)
  [c52e3926] Atom v0.12.15
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.6.2
  [5d742f6a] CSVFiles v1.0.0
  [324d7699] CategoricalArrays v0.8.1
  [aaaa29a8] Clustering v0.14.1
  [ed09eef8] ComputationalResources v0.3.2
  [60f91f6f] CovarianceMatrices v0.9.1
  [a93c6f00] DataFrames v0.21.2
  [7806a523] DecisionTree v0.10.3
  [31c24e10] Distributions v0.22.6
  [f6006082] EvoTrees v0.4.8 #master (https://github.com/Evovest/EvoTrees.jl)
  [f6369f11] ForwardDiff v0.10.10
  [38e38edf] GLM v1.3.9
  [c91e804a] Gadfly v1.2.1 #master (https://github.com/GiovineItalia/Gadfly.jl)
  [cd3eb016] HTTP v0.8.15
  [09f84164] HypothesisTests v0.10.0
  [7073ff75] IJulia v1.21.2
  [a98d9a8b] Interpolations v0.12.10
  [e5e0dc1b] Juno v0.8.2
  [b1bec4e5] LIBSVM v0.4.0
  [2ec943e9] Libz v1.0.1
  [7acf609c] LightGBM v0.3.1
  [add582a8] MLJ v0.11.4 #master (https://github.com/alan-turing-institute/MLJ.jl)
  [a7f614a8] MLJBase v0.13.10
  [6ee0df7b] MLJLinearModels v0.5.0
  [d491faf4] MLJModels v0.9.12
  [03970b2e] MLJTuning v0.3.6
  [6f286f6a] MultivariateStats v0.7.0
  [0db19996] NBInclude v2.2.0
  [9bbee03b] NaiveBayes v0.4.0
  [b8a86587] NearestNeighbors v0.4.4
  [efe28fd5] OpenSpecFun_jll v0.5.3+1 [`~/.julia/dev/OpenSpecFun_jll`]
  [429524aa] Optim v0.20.1
  [e010f91f] PLSRegressor v1.1.1
  [42b8e9d4] ParallelKMeans v0.1.8
  [91a5bcdd] Plots v1.4.3
  [08abe8d2] PrettyTables v0.9.1
  [c46f51b8] ProfileView v0.6.5
  [ce6b1742] RDatasets v0.6.9
  [3646fa90] ScikitLearn v0.6.2
  [40c74d1a] TableView v0.6.0 #master (https://github.com/JuliaComputing/TableView.jl)
  [eb66a70c] TreeParzen v0.1.1
  [009559a3] XGBoost v0.4.3
  [cf18a64e] mlpack v3.3.1

julia> 

@OkonSamuel
Copy link
Collaborator

OkonSamuel commented Jun 21, 2020

@azev77 Ok.
Now try the following code snippet.

Pkg.add("PyCall")
ENV["PYTHON"]= ""
Pkg.build("PyCall")
Pkg.update("ScikitLearn")

@azev77
Copy link

azev77 commented Jun 21, 2020

I got the same error:

Pkg.add("PyCall")
ENV["PYTHON"]= ""
Pkg.build("PyCall")
Pkg.update("ScikitLearn")
using ScikitLearn;
ScikitLearn.Skcore.import_sklearn()

@OkonSamuel
Copy link
Collaborator

OkonSamuel commented Jun 21, 2020

@azev77 Ok try

Pkg.add("Conda")
using Conda
Conda.add("nomkl")
Conda.add("scikit-learn")
Conda.add("numexpr")
Conda.rm("mkl")

then

Pkg.build("PyCall")
Pkg.update("ScikitLearn")
using ScikitLearn;
ScikitLearn.Skcore.import_sklearn()

Sorry for making you try all these. It's because am not on a Mac

@azev77
Copy link

azev77 commented Jun 21, 2020

It works now! (though I did have to restart Julia!)
Thank you so much @OkonSamuel !!!

It would be great if these instructions were clearly listed in the Readme for ScikitLearn.jl & MLJ.jl

@OkonSamuel
Copy link
Collaborator

I'll update the source code instead. I think i know the reason if failed for you and passed CI.

@OkonSamuel
Copy link
Collaborator

OkonSamuel commented Jun 21, 2020

@cstjean. I am going to remove AdaBoostClassifier(From DecisionTree,jl) from the example notebook. Until this issue https://github.com/bensadeghi/DecisionTree.jl/issues/121 gets fixed

@cstjean
Copy link
Owner

cstjean commented Jun 21, 2020

Sounds good, thank you for looking into it.

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

4 participants