memoiry / LightML.jl

Minimal and clean examples of machine learning algorithms implemented in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No module named sklearn.datasets

marekfoltyn opened this issue · comments

After installing LightML i can not import LightML:

snimek obrazovky 2017-05-23 v 12 57 28

Hi,

It's caused by the dependency of python's sklearn package, you can download it by

pip install sklearn

I recommend downloading it directly, read the source code and import it for testing as this is a package for learning purpose only for now.

pip install sklearn
Requirement already satisfied: sklearn in /Library/Python/2.7/site-packages
Requirement already satisfied: scikit-learn in /Library/Python/2.7/site-packages (from sklearn)

Is LightML using another Python interpreter? I am a bit confused now :)

I think it should be fine now, have you tried to import sklearn.datsets in python REPL?

Yes, it works, but not in LightML. So I guess it is not LightML's problem, but my PC's... :)

I think julia is not calling the right python version with sklearn installed?(maybe you have installed several python environment?)

you can try to use pycall in your julia environment and find out the answer.

Yes, julia uses different python interpreter. Solved with running pip in the julia-internal python:

~/.julia/v0.5/Conda/deps/usr/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/pip install sklearn

Thanks for your tips :)