question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get Error while import the module

See original GitHub issue

Description

I get this error after importing the module /usr/local/lib/python3.6/dist-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 import imp

Can I ignore it? How to solve it?

Steps/Code to Reproduce

import sklearn

Expected Results

NO ISSUE

Actual Results

/usr/local/lib/python3.6/dist-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 import imp

Versions

PLATFORM=Linux-4.15.0-34-generic-x86_64-with-Ubuntu-18.04-bionic PYTHON=Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0] NUMPY=NumPy 1.15.2 SCIPY= SciPy 1.1.0 SKLEARN=Scikit-Learn 0.20rc1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:19
  • Comments:24 (6 by maintainers)

github_iconTop GitHub Comments

30reactions
mohak2312commented, Oct 5, 2018

I face the same issue. Just try to install cloudpickle library. It works for me.

pip install cloudpickle

20reactions
droratacommented, Nov 23, 2018

Seems like updating sklearn to 0.20.1 solves the issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Import Error (ModuleNotFoundError) - Finxter
Python's ImportError ( ModuleNotFoundError ) indicates that you tried to import a module that Python doesn't find. It can usually be eliminated by...
Read more >
Python import module error - Stack Overflow
Here's my best guess as to what might help: You should make sure that the path to the directory in which your main.py...
Read more >
ModuleNotFoundError: no module named Python Error [Fixed]
How to fix the ModuleNotFoundError in Python · 1. Make sure imported modules are installed · 2. Make sure modules are spelled correctly...
Read more >
How to Fix ModuleNotFoundError and ImportError
path . Recall that when you call import a if the module's name was found neither in sys.modules nor in standard library, Python...
Read more >
2021 How to Fix "No Module Named..." Error in Python
Key moments. View all · Option 1, use the 'Terminal' in your IDE (PyCharm) · Option 1, use the 'Terminal' in your IDE...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found