<h4 dir="auto">Description</h4>
<p dir="auto">I got a DeprecationWarning with the imp module since i update my python version to python 3.7.<br>
Here is the message</p>
<blockquote>
<p dir="auto">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</p>
</blockquote>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto"><code class="notranslate">import sklearn</code></p>
<h4 dir="auto">Possible corrections</h4>
<p dir="auto">modify cloudpickle.py file and replace following lines by following values</p>
<ul dir="auto">
<li>l.47: <code class="notranslate">import importlib</code></li>
<li>l.937: <code class="notranslate">mod = types.ModuleType(name)</code></li>
<li>l.1138: <code class="notranslate">file, path, description = importlib.util._find_spec(part, path)</code></li>
</ul>
<p dir="auto">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...</p>
<h4 dir="auto">Versions</h4>
<p dir="auto">On Windows10  environment.<br>
Python 3.7.0<br>
sklean 0.20.0</p>
<h4 dir="auto">Description</h4>
<p dir="auto">I get this error after importing the module<br>
<code class="notranslate">/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</code></p>
<p dir="auto">Can I ignore it?<br>
How to solve it?</p>
<h4 dir="auto">Steps/Code to Reproduce</h4>
<p dir="auto"><code class="notranslate">import sklearn</code></p>
<h4 dir="auto">Expected Results</h4>
<p dir="auto">NO ISSUE</p>
<h4 dir="auto">Actual Results</h4>
<p dir="auto"><code class="notranslate">/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</code></p>
<h4 dir="auto">Versions</h4>
<p dir="auto">PLATFORM=Linux-4.15.0-34-generic-x86_64-with-Ubuntu-18.04-bionic<br>
PYTHON=Python 3.6.5 (default, Apr  1 2018, 05:46:30) [GCC 7.3.0]<br>
NUMPY=NumPy 1.15.2<br>
SCIPY= SciPy 1.1.0<br>
SKLEARN=Scikit-Learn 0.20rc1</p>