I have installed the latest version of Python numpy module but when i tried to look for the version of the new numpy module, it still shows me the old version.
sudo pip install 'numpy==1.9.0'
python -c "import numpy; print numpy.__version__"
1.8.2
Here are my Python and pip versions
python --version
Python 2.7.6
pip --version
pip 8.1.2
Am i missing something here?
The version of
pip
you are using is not associated with the version of Python you're using.pip
is installing NumPy into the miniconda distribution (BTW, are you aware that the latest version of NumPy is 1.11.3?), whereas your Python binary is reading its site-packages from elsewhere. To determine this, runat the command prompt, then once in the interpreter run
sys.executable
will tell you whichpython
binary you're running, and thesys.path
list will tell you from where Python is importing its packages.All this being said, you need to point your
pip
script to the version of Python you're actually using. The easiest way (IMO) is to downloadget-pip.py
, then run either(after changing to the download directory) or
depending on whether you're an admin or not. This will install the latest version of pip (currently 9.0.1) and associate it with the version of Python that was used to call the script.