python - 如何查找和卸载 numpy 重复版本

标签 python numpy python-2.7 gpy

我正在尝试安装库 GPy。虽然安装成功了,但是我对我的numpy版本有疑问。

可以在这里找到 GPy 库 https://github.com/SheffieldML/GPy

我的numpy当前版本是1.9.3

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

但是当我为 GPy 执行 python setup.py install 时,它指的是 numpy 1.10.0。我检查了 python 2.7/site-packages 那里只有一个版本的 numpy 也存在 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$ 

因为它指的是另一个版本,所以我得到了类似

的错误
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

谁能告诉我如何找到并删除 numpy 1.10.0 ?

最佳答案

来自conda FAQ :

conda update numpy --no-pin

关于python - 如何查找和卸载 numpy 重复版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32992782/

相关文章:

pandas - 如何在 matplot 上绘制散点趋势线? Python-Pandas

string - 使用列表理解的 Python 字符串形成

python - 通过 pyramid Response 呈现动态生成的 HTML

python - 为什么我们需要 __init__ 来初始化一个 python 类

numpy - 绘制屏蔽的 numpy 数组会导致颜色条不正确

python - 如何获得 ndarray 的 x 和 y 维度 - Numpy/Python

python - 使用协议(protocol) 2 : Python3->2 data 进行 pickle

python - 使用 Python 编写的配置文件

使用 pyPDF 删除空白页的 Python 脚本

python - Keras:最佳纪元选择