scikit-learn package successfully updated, but continues to use/show old version
<p>I just got access to a new server which has Python 2.7 and some packages already installed. However, I need the newest version of scikit-learn (0.18.0). </p>

<p>I tried to pip-upgrade the package, which returns the following affirmative message <code>Successfully installed scikit-learn Cleaning up...</code></p>

<p>I used the following command, which worked for upgrading other packages (e.g. scipy):</p>

<pre><code>OPENBLAS=/cluster/apps/openblas/0.2.13_seq/x86_64/gcc_5.2.0/lib python -m pip install --user --upgrade scikit-learn
</code></pre>

<p>When checking the version with <code>pip freeze</code> and <code>python -c 'import sklearn; print sklearn.__version__'</code> it continues to show the old version (0.17.1). In my home directory (I don't have root access) a folder named 'scikit_learn-0.18-py2.7.egg-info' was created.</p>

<p>Can someone point out what I'm doing wrong?</p>

<p>Edit: I'm on Centos 6 and packages like numpy and scipy worked just fine</p>

<p>Hi I was in the same situation as you, in order to get the correct version of sklearn, before importing it,
I added this line to my code:</p>

<pre><code>import sys
sys.path.insert(0, '/home/your_user_name/.local/lib/python2.7/site-packages/')
</code></pre>

<p>I am not quite sure about the path part, but basically I think it is</p>

<pre><code>sys.path.insert(0, '$HOME/.local/lib/python2.7/site-packages/')
</code></pre>

<p>Hope this helps.</p>

python scikit-learn pip