DeprecationWarning

When I was importing the sklearn library, the program threw a discard warning, which means that after the version update, the imp library is no longer used. Use importlib to replace this library.

Warning (from warnings module):
File “C:\Users \33171\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\externals\joblib\externals\cloudpickle\cloudpickle.py”, line 47
import imp
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses< /p>

So the solution is to copy its file path, C:\Users\33171\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\externals\joblib\externals\cloudpickle

Open it, and then change the

import imp –> in the cloudpickle.py file to import importlib

Share picture