title: BlueMix: Unable to import updated sklearn into iPython
body: <p>I am running an ipython notebook on IBM BlueMix and the default version of sklearn is version 0.11 -- I want to upgrade to sklearn-0.18.</p>
  
  <p>Edit: I meant I want to upgrade to sklearn-0.17. </p>
  
  <pre><code>import sklearn
  print sklearn.__version__
  
  ​0.11
  </code></pre>
  
  <p>The BlueMix docs say to use:</p>
  
  <pre><code>!pip install -U --user sklearn
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>You are using pip version 7.1.0, however version 8.0.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  Requirement already up-to-date: sklearn in /gpfs/global_fs01/sym_shared/YPProdSpark/user/s3b2-519e0ce881616c-546ab68fb1ed/.local/lib/python2.7/site-packages
  Collecting scikit-learn (from sklearn)
    Using cached scikit-learn-0.17.tar.gz
  Installing collected packages: scikit-learn
    Running setup.py install for scikit-learn
  Successfully installed scikit-learn-0.11
  </code></pre>
  
  <p>That didn't seem to work. Maybe it has something to do with the old version of pip...</p>
  
  <pre><code>!pip install --upgrade --user pip
  
  
  You are using pip version 7.1.0, however version 8.0.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  Collecting pip
    Using cached pip-8.0.2-py2.py3-none-any.whl
  Installing collected packages: pip
  Successfully installed pip-7.1.0
  
  
  import pip
  print pip.__version__
  
  7.1.0
  </code></pre>
  
  <p>Ok, so it's not just sklearn. The problem seems to be that somehow upgraded packages are not being installed in the correct path.</p>
  
  <p>After some sleuthing, I find:</p>
  
  <pre><code>!ls -al ~/.local/lib/python2.7/site-packages
  
  total 0
  drwx------  8 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 18:06 .
  drwx------  3 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 15:30 ..
  drwxr-xr-x 10 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 15:46 pip
  drwxr-xr-x  2 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 15:53 pip-8.0.1.dist-info
  drwxr-xr-x  2 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 18:40 pip-8.0.2.dist-info
  drwxr-xr-x  2 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 18:06 scikit_learn-0.17-py2.7.egg-info
  drwxr-xr-x 25 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 18:06 sklearn
  drwxr-xr-x  2 s3b2-519e0ce881616c-546ab68fb1ed users 4096 Jan 22 15:48 sklearn-0.0-py2.7.egg-info
  </code></pre>
  
  <p>So, let's try this...  </p>
  
  <pre><code>import sys
  sys.path.insert(0, '/gpfs/fs01/user/s3b2-519e0ce881616c-546ab68fb1ed/.local/lib/python2.7/site-packages/')
  
  reload(sklearn)
  print sklearn.__version__
  
  ​0.17
  </code></pre>
  
  <p>Now, it looks like version is correct, so try to import some of the new functions from sklearn-0.17.</p>
  
  <pre><code>from sklearn.metrics import roc_auc_score
  
  
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  &lt;ipython-input-169-8985e3efac9f&gt; in &lt;module&gt;()
  ----&gt; 1 from sklearn.metrics import roc_auc_score
  
  ImportError: cannot import name roc_auc_score
  </code></pre>
  
  <p>I get the same error with anything that is supposed to be in version 0.17. It seems like python is referencing the old sklearn version 0.11 when trying to import.</p>
  
  <p>Any help is appreciated.</p>