Python is using the wrong version of Numpy module
<p>I'm trying to use Numpy 1.11.1 for Python 2.7. I have Mac El Capitan, so <code>sudo pip install</code> doesn't work.</p>

<p>I decided to install Homebrew and do <code>brew install python</code> and that worked. If I use <code>pip show numpy</code> it shows that I have Numpy 1.11.1 now.</p>

<p>But if I run <code>python -c 'import numpy; print numpy.version.version'</code> I still get <code>1.8.0rc1</code> which is the old version I was trying to upgrade!</p>

<p>How do I use the correct numpy module? I would like to do this in a way that doesn't require adding in a line to the python scripts that call numpy, but if that's the only way then I'll do it.</p>

<p>info:</p>

<pre><code>which pip
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip
which pip
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip
which pip2
/usr/local/bin/pip2
which pip3
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip3
which python
/usr/bin/python
which python2
which python2.7
/usr/bin/python2.7
which python3
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
which python3.5
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
</code></pre>

<p>It's better to use a <strong><a href="https://virtualenv.pypa.io/en/stable/" rel="nofollow">virtualenv</a></strong> to install the required libraries version. Don't pollute your system Python.</p>

<p>It will solve your problemâ¦</p>

<pre><code>mkdir $HOME/virtualenv
cd $HOME/virtualenv
virtualenv my_app
source my_app/bin/activate
pip install the_lib==x.y.z
</code></pre>

<p>Where <em>the_lib</em> is <strong>numpy</strong> and <em>x.y.z</em> is the version <strong>1.11.1</strong>.</p>

python python-2.7 numpy version