'How to find and uninstall the numpy duplicate versions

I am trying to install the library GPy. Although the installation is successful, I have a question on my numpy version.

GPy library can be found here https://github.com/SheffieldML/GPy

The current version of my numpy is 1.9.3

>>> import numpy
>>> numpy.version.version
'1.9.3'

But when I perform python setup.py install for GPy, it refers to numpy 1.10.0. I checked in python 2.7/site-packages there only one version of numpy exist that too 1.9.3

Using /home/vinod/anaconda/lib/python2.7/site-packages
Searching for scipy==0.16.0
Best match: scipy 0.16.0
Adding scipy 0.16.0 to easy-install.pth file

Using /home/vinod/anaconda/lib/python2.7/site-packages
Searching for numpy==1.10.0
Best match: numpy 1.10.0
Adding numpy 1.10.0 to easy-install.pth file

Using /home/vinod/anaconda/lib/python2.7/site-packages
Finished processing dependencies for GPy==0.8.8
vinod@vinod-Lenovo-G580:~/GPy$ 

Since it's referring to another version am getting error like

File"__init__.pxd", line 155, in init GPy.util.linalg_cython (GPy/util/linalg_cython.c:4238)
ValueError: numpy.dtype has the wrong size, try recompiling

Could anyone tell me how to find and remove the numpy 1.10.0 ?



Solution 1:[1]

From the conda FAQ:

conda update numpy --no-pin

Solution 2:[2]

I tried the following steps and it works but still I don't know how.

  1. I opened the setup.py and changed the numpy condition from numpy >= 1.7 to numpy <=1.9.3
  2. Then I performed the python setup.py install
  3. Then I uninstalled GPy using pip uninstall GPy
  4. Again I installed GPy but using pip install GPy. Note: in previous steps I used git and installed separately.
  5. This time it upgraded my numpy to 1.10.0 during installation and got installed successfully
  6. Finally now it works well.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zac Crites
Solution 2 Vinod Prime