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

Error from sklearn.externals import joblib ImportError: cannot import name 'joblib' from 'sklearn.externals' (/usr/local/lib/python3.7/site-packages/sklearn/externals/__init__.py) #86

Closed
boypanjaitan16 opened this issue Jun 22, 2020 · 4 comments

Comments

@boypanjaitan16
Copy link

I got this error, I think it's something about joblib library

File "", line 1, in
File "/usr/local/lib/python3.7/site-packages/hatesonar/init.py", line 1, in
from hatesonar.api import Sonar
File "/usr/local/lib/python3.7/site-packages/hatesonar/api.py", line 12, in
from sklearn.externals import joblib
ImportError: cannot import name 'joblib' from 'sklearn.externals' (/usr/local/lib/python3.7/site-packages/sklearn/externals/init.py)

@AlphaYui
Copy link

The same issue occurs for me with Python 3.6. It seems to be caused by a recent update to scikit-learn:
https://stackoverflow.com/questions/56113916/cannot-import-sklearn-from-sklearn-externals-joblib

I was able to resolve it by uninstalling the scikit-learn package and specifically reinstalling version 0.20.3.

@christopher-hacker
Copy link

Same issue here

@acastrob
Copy link

acastrob commented Jul 1, 2020

Thank you, AlphaYui.

You are right. Uninstalling the current version (pip uninstall scikit-learn) it and installing version 0.30.3 did it for me:

sudo pip install --ignore-installed scikit-learn==0.20.3

@Hironsan
Copy link
Owner

Hironsan commented Jul 2, 2020

I replaced sklearn.externals.joblib with joblib and updated hatesonar.

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

5 participants