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

Joblib error #214

Open
yatanasoff opened this issue Feb 8, 2021 · 9 comments
Open

Joblib error #214

yatanasoff opened this issue Feb 8, 2021 · 9 comments

Comments

@yatanasoff
Copy link

Hi, when trying the machine learning approach to extract the text and signature from the email that is in the readme i get this error

ImportError: cannot import name 'joblib' from 'sklearn.externals' (/home/christmas/Projects/emails/emails/lib/python3.7/site-packages/sklearn/externals/__init__.py)

I'm on debian buster, using venv/pipenv and getting that result
Can anybody help me fix this?
thanks

@yatanasoff
Copy link
Author

is this library deprecated?

@mann2107
Copy link

I am also getting a similar error

@mann2107
Copy link

I solved this issue by uninstalling scikit-learn and reinstalling a lower version.
To remove the current version, you can run
pip uninstall scikit-learn

Then, to re install v 0.22.2 run
pip install scikit-learn==0.22.2

@yatanasoff
Copy link
Author

thx @mann2107 i took another approach and removed the machine learning logic, at the end i just needed the regex pack, but ill try this

@vovanec
Copy link

vovanec commented May 14, 2021

@atanasoff-yordan I faced exactly the same issue and submitted pull request: #219

@vedmant
Copy link

vedmant commented Jun 10, 2021

I have the same issue, adding scikit-learn==0.22.2 to requirements.txt didn't help me. Is there any info when new release wit PR can be published?

@ankygupta9999
Copy link

I solved this issue by uninstalling scikit-learn and reinstalling a lower version.
To remove the current version, you can run
pip uninstall scikit-learn

Then, to re install v 0.22.2 run
pip install scikit-learn==0.22.2

Thanks It worked...

This is the original warning which sckit-learn is throwing in 0.22.2 version:

FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+.

@Fwhiteiv
Copy link

Fwhiteiv commented Sep 2, 2021

I think this may be a problem with the pypi version of talon.

If you look here on the repo in classifier.py, you see the includes are

from numpy import genfromtxt
import joblib
from sklearn.svm import LinearSVC

But if you do a fresh install of talon pip install --force-reinstall talon and look at the classifier.py in the lib, you'll see that the imports are:

from numpy import genfromtxt
from sklearn.externals import joblib
from sklearn.svm import LinearSVC

@toasta
Copy link

toasta commented Jan 25, 2022

can confirm

pip install git+https://github.com/mailgun/talon/

fixes
ImportError: cannot import name 'joblib' from 'sklearn.externals'

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

7 participants