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

DeprecationWarning : imp module #12354

Closed
Pibmy opened this issue Oct 11, 2018 · 1 comment
Closed

DeprecationWarning : imp module #12354

Pibmy opened this issue Oct 11, 2018 · 1 comment

Comments

@Pibmy
Copy link

Pibmy commented Oct 11, 2018

Description

I got a DeprecationWarning with the imp module since i update my python version to python 3.7.
Here is the message

XXX\site-packages\sklearn\externals\joblib\externals\cloudpickle\cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

Steps/Code to Reproduce

import sklearn

Possible corrections

modify cloudpickle.py file and replace following lines by following values

  • l.47: import importlib
  • l.937: mod = types.ModuleType(name)
  • l.1138: file, path, description = importlib.util._find_spec(part, path)

I'm quite a newby on GitHub, I don't really know how to use pull request and evrything so i post my solution here as if it is a bit ugly...

Versions

On Windows10 environment.
Python 3.7.0
sklean 0.20.0

@qinhanmin2014
Copy link
Member

Duplicate of #12226, please see the discussions there.

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

2 participants