0

In my program, I need to use some joblib functions. However, when I run the program, I get the error message: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23.

Apparently the library has been updated in this Github repo but I did not have success installing the library with the pip install command

I did a test just to install the setup file pip install https://github.com/dsxuser/scikit-learn/setup.py/0.20.x.zip but i got 404 error. What I need is to update all the joblib library in that branch.

Does anyone know how to properly install it?

Roland Weber
  • 1,865
  • 2
  • 17
  • 27

1 Answers1

3

That's not an error, that's a warning. It tells you that you shouldn't use sklearn.externals.joblib anymore, if you want your code to be compatible with later versions of scikit-learn. Should means that you still can, as long as you do NOT upgrade scikit-learn to 0.23 or later.

The way to make your code ready for later versions of scikit-learn is to not use the deprecated sklearn.externals.joblib, but to use joblib directly instead. It's not pre-installed, so you can do one of these:

  • conda install joblib
  • pip install joblib

You didn't mention what part of Watson Studio you are using. If it's notebooks without Spark, the preferred way to install packages is with conda. You can define a custom environment with this customization:

dependencies:
- joblib=0.13.2

or else you can call conda from a notebook cell:

!conda install joblib=0.13.2

If you're using some other part of Watson Studio, give conda a try, and if it doesn't work, switch to pip. Note that pip expects == instead of = before the version number. Specifying the version number protects you from surprises when new versions of joblib are released.

Roland Weber
  • 1,865
  • 2
  • 17
  • 27