memoiry / LightML.jl

Minimal and clean examples of machine learning algorithms implemented in Julia
Other
403 stars 69 forks source link

No module named sklearn.datasets #5

Closed marekfoltyn closed 7 years ago

marekfoltyn commented 7 years ago

After installing LightML i can not import LightML:

snimek obrazovky 2017-05-23 v 12 57 28
memoiry commented 7 years ago

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.

marekfoltyn commented 7 years ago

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 :)

memoiry commented 7 years ago

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

marekfoltyn commented 7 years ago

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

memoiry commented 7 years ago

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.

marekfoltyn commented 7 years ago

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 :)