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

no module name sklearn #10

Open
TeCoEd opened this issue Oct 1, 2016 · 16 comments
Open

no module name sklearn #10

TeCoEd opened this issue Oct 1, 2016 · 16 comments

Comments

@TeCoEd
Copy link

TeCoEd commented Oct 1, 2016

Hi

I keep getting this error, is there a list of dependencies that need to be installed first?

Thanks

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

It would be best to install through pip install whereami, did you try that? What OS, which python version?

@fcladera
Copy link

fcladera commented Oct 1, 2016

On Saturday, October 1, 2016 3:33:12 PM ART, Dan Aldred wrote:

Hi

I keep getting this error, is there a list of dependencies that
need to be installed first?

Thanks

Please note that some functions required in whereami are available only
in scikit-learn >= 0.18.

I am currently packaging whereami for Arch Linux AUR, and I cannot
ship the latest version because Arch includes python-scikit-learn
0.17.1.

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

@fcladera If you tell me what is specifically not supported (how the error shows) then I will fix it immediately.

As an aside, I find it strange that Arch doesn't work, isn't it doing rolling upgrades? On my Arch Linux server it is working just fine btw, so I'm very curious for more details :)

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

I did a tox test with scikit-learn==0.17.0 and indeed, I see what you mean.

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

Should be fixed as of whereami==0.3.40.

It will try to use the "new" (model_selection) way of sklearn first, if not, then use the "old" (cross_validation) way.

try:
    from sklearn.model_selection import cross_val_score
except ImportError:
    from sklearn.cross_validation import cross_val_score

@TeCoEd
Copy link
Author

TeCoEd commented Oct 1, 2016

Hi, I am running it on the Raspberry Pi, using Jessie, I will try the upgrade now.. thanks for the quick response 👍

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

@TeCoEd You're welcome :) If you recently tried an upgrade, you might want to try to upgrade like pip install -U --no-cache whereami

@fcladera
Copy link

fcladera commented Oct 1, 2016

On Saturday, October 1, 2016 4:05:45 PM ART, Pascal van Kooten wrote:

Should be fixed as of whereami==0.3.40.

It will try to use the "new" (model_selection) way of
sklearn first, if not, then use the "old" (cross_validation)
way.

try:
    from sklearn.model_selection import cross_val_score
except ImportError:
    from sklearn.cross_validation import cross_val_score

Hi, sorry for the late answer. I confirm that it works with 0.17.

I'll ship the new version.

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

Fantastic to be included in AUR :) Note that it was having difficulties installing and it mentioned 2 scikit versions:

Packages (2) python-scipy-0.18.1-1  python-scikit-learn-0.17.1-2

Also, I was only able to find it through yaourt, is that how it is supposed to be?

Btw, I think I'm not able to install it as I've already installed scikit through pip?

@TeCoEd
Copy link
Author

TeCoEd commented Oct 1, 2016

still getting an error: "no module named sklearn",

@fcladera
Copy link

fcladera commented Oct 1, 2016

@kootenpv That's correct, because you must install both scipy and scikit-learn to make it work.

It is stated in the scipy-learn website

Built on NumPy, SciPy, and matplotlib

Hence, pacman installs scipy as a dependency.

The PKGBUILD has the following dependencies:

depends=( 'python-access_points' 'python-tqdm' 'python-scikit-learn')

(BTW, that means access_points is also in the AUR)

and all the magic is done by yaourt and pacman.

You may have problems to install the packages if pip uses the same location to store the packages. pacman will not overwrite an existing file.

You will only find this package with yaourt because it is in AUR, not in the community repository.

https://wiki.archlinux.org/index.php/Arch_User_Repository#What_is_the_AUR.3F

@fcladera
Copy link

fcladera commented Oct 1, 2016

@TeCoEd try

pip install -U scikit-learn

@kootenpv
Copy link
Owner

kootenpv commented Oct 1, 2016

@fcladera The thing is, I already have installed scikit-learn using pip; it is now clashing unfortunately. Or that might result from testing whereami on python 2 as well, I'm not sure. I guess I'll try to remove scikit-learn python 2 and see if I get no clashes.

@fcladera
Copy link

fcladera commented Oct 1, 2016

@kootenpv if you get

/path/to/file exists in filesystem

that means pip uses the same directory as pacman. Usually, you cannot install python packages using both pacman and pip globally!

This package is for python 3, it will not conflict with python 2 versions.

@TeCoEd
Copy link
Author

TeCoEd commented Oct 1, 2016

so now I am trying pip3 for the installation of the dependencies.

@TeCoEd
Copy link
Author

TeCoEd commented Oct 1, 2016

still errors here

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

3 participants