+2 votes
in Programming Languages by (6k points)

I have imported pickle library to load a compressed sparse matrix. When I run my code, it gives the following warning message. However, the code works without any error. How can I fix this warning message.

/home/xxxx/anaconda3/lib/python3.6/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp vour of importlib; see the module's documentation for alternative uses
  import imp

1 Answer

0 votes
by (11.3k points)

It seems that you are not using the latest version of sklearn package. If you are using Anaconda, run the following two commands to upgrade all the old packages.

1. conda update -n base conda
2. conda update anaconda

If you are not using Anaconda, upgrade Numpy, Scipy, and sklearn.Hopefully, it will fix the warning message. You can use pip to upgrade packages.

pip install --upgrade PackageName