@sk_import preprocessing: LabelEncoder is throwing the following error: PackagesNotFoundError: The following packages are missing from the target environment: - mkl

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