# @sk\_import preprocessing: LabelEncoder is throwing the following error: PackagesNotFoundError: The following packages are missing from the target environment: - mkl

**URL:** <https://discourse.julialang.org/t/sk-import-preprocessing-labelencoder-is-throwing-the-following-error-packagesnotfounderror-the-following-packages-are-missing-from-the-target-environment-mkl/44507>\
**Category:** General Usage\
**Created:** [August 7, 2020, 4:00pm UTC](https://discourse.julialang.org/t/sk-import-preprocessing-labelencoder-is-throwing-the-following-error-packagesnotfounderror-the-following-packages-are-missing-from-the-target-environment-mkl/44507 "2020-08-07T16:00:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mrinalini\_madhusudan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrinalini_madhusudan/32/16492_2.png) [@Mrinalini\_madhusudan](https://discourse.julialang.org/u/Mrinalini_madhusudan)\
**Post date:** [August 7, 2020, 4:00pm UTC](https://discourse.julialang.org/t/sk-import-preprocessing-labelencoder-is-throwing-the-following-error-packagesnotfounderror-the-following-packages-are-missing-from-the-target-environment-mkl/44507/1 "2020-08-07T16:00:44Z")

</div>

This error didn’t come when i compiled **@sk\_import preprocessing: LabelEncoder** for the first time, but throwing this error for the subsequent runs. I also face the same issue for every other library import.

Eg.  
@sk\_import metrics: accuracy\_score  
@sk\_import linear\_model: LogisticRegression  
@sk\_import ensemble: RandomForestClassifier  
@sk\_import tree: DecisionTreeClassifier

I tried reinstalling ScikitLearn package, but of no use. Can anyone please throw some light on this issue and help me solve this?

Following is the Error stacktrace:

> Warning: Module model\_selection has been ported to Julia - try `import ScikitLearn: CrossValidation` instead  
> └ @ ScikitLearn.Skcore /Users/mm37/.julia/packages/ScikitLearn/Kn82b/src/Skcore.jl:169  
> ┌ Info: Installing non-mkl versions of sci-kit learn  
> └ @ ScikitLearn.Skcore /Users/mm37/.julia/packages/ScikitLearn/Kn82b/src/Skcore.jl:126  
> ┌ Info: Running `conda install -y nomkl` in root environment  
> └ @ Conda /Users/mm37/.julia/packages/Conda/3rPhK/src/Conda.jl:113  
> Collecting package metadata (current\_repodata.json): …working… done  
> Solving environment: …working… done
> 
> # All requested packages already installed.
> 
> ┌ Info: Running `conda remove -y mkl` in root environment  
> └ @ Conda /Users/mm37/.julia/packages/Conda/3rPhK/src/Conda.jl:113  
> Collecting package metadata (repodata.json): …working… done  
> Solving environment: …working… failed
> 
> PackagesNotFoundError: The following packages are missing from the target environment:
> 
> - mkl
> 
> ┌ Info: scikit-learn isn’t properly installed.Please use PyCall default Conda or non-conda local python  
> └ @ ScikitLearn.Skcore /Users/mm37/.julia/packages/ScikitLearn/Kn82b/src/Skcore.jl:138  
> failed process: Process(setenv(`/Users/mm37/.julia/conda/3/bin/conda remove -y mkl`,[“\_CE\_M=”, “PATH=/Applications/Julia-1.4.app/Contents/Resources/julia/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/opt/local/bin:/opt/local/sbin:/anaconda2/bin:/anaconda3/bin:/anaconda3/condabin:/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin”, “GKS\_USE\_CAIRO\_PNG=true”, “DISABLE\_UPDATE\_CHECK=1”, “Apple\_PubSub\_Socket\_Render=/private/tmp/com.apple.launchd.Vy4cB9IUtk/Render”, “USER=mm37”, “GKSwstype=svg”, “COLUMNS=80”, “SHELL=/bin/bash”, “TMPDIR=/var/folders/56/13j9kk1x42x80ppz1vwb2x80mr4f56/T/”, “CONDARC=/Users/mm37/.julia/conda/3/condarc-julia.yml”, “KMP\_DUPLICATE\_LIB\_OK=True”, “_CE\_CONDA=", “LINES=30”, “MPLBACKEND=Agg”, “TERM=xterm-256color”, “HOME=/Users/mm37”, “PYTHONIOENCODING=UTF-8”, “XPC\_FLAGS=0x0”, “XPC\_SERVICE\_NAME=0”, “\_\_CF\_USER\_TEXT\_ENCODING=0x298238A6:0x0:0x0”, “KMP\_INIT\_AT\_FORK=FALSE”, “LC\_CTYPE=UTF-8”, “SHLVL=1”, “LOGNAME=mm37”, “OLDPWD=/Users/mm37”, “SSH\_AUTH\_SOCK=/private/tmp/com.apple.launchd.GwHdxuPIgr/Listeners”, “RV\_OS\_PATH\_WINDOWS=Z:”, "_=/anaconda3/bin/jupyter-notebook”, “GKS\_FILEPATH=/var/folders/56/13j9kk1x42x80ppz1vwb2x80mr4f56/T/jl\_UkV29L.svg”, “TERM\_PROGRAM\_VERSION=421.2”, “PWD=/Users/mm37”, “GRDIR=/Users/mm37/.julia/packages/GR/yMV3y/src/…/deps/gr”, “TERM\_PROGRAM=Apple\_Terminal”, “OPENBLAS\_NUM\_THREADS=8”, “JPY\_PARENT\_PID=29186”, “GKS\_FONTPATH=/Users/mm37/.julia/packages/GR/yMV3y/src/…/deps/gr”, “CONDA\_PREFIX=/Users/mm37/.julia/conda/3”, “TERM\_SESSION\_ID=4967DA78-74BA-4704-AA2B-08F03233138D”, “OPENBLAS\_MAIN\_FREE=1”]), ProcessExited(1)) [1]
> 
> Stacktrace:  
> [1] pipeline\_error at ./process.jl:525 [inlined]  
> [2] run(::Cmd; wait::Bool) at ./process.jl:440  
> [3] run at ./process.jl:438 [inlined]  
> [4] runconda(::Cmd, ::String) at /Users/mm37/.julia/packages/Conda/3rPhK/src/Conda.jl:114  
> [5] rm at /Users/mm37/.julia/packages/Conda/3rPhK/src/Conda.jl:193 [inlined] (repeats 2 times)  
> [6] import\_sklearn() at /Users/mm37/.julia/packages/ScikitLearn/Kn82b/src/Skcore.jl:133  
> [7] top-level scope at /Users/mm37/.julia/packages/ScikitLearn/Kn82b/src/Skcore.jl:182  
> [8] top-level scope at In[138]:2
