【发布时间】:2012-06-22 06:35:55
【问题描述】:
我正在尝试在我分发的包中创建所需的库。它需要SciPy 和NumPy 库。 在开发过程中,我都安装了使用
apt-get install scipy
它安装了 SciPy 0.9.0 和 NumPy 1.5.1,并且运行良好。
我想使用 pip install 做同样的事情 - 为了能够在我自己的包的 setup.py 中指定依赖项。
问题是,当我尝试时:
pip install 'numpy==1.5.1'
效果很好。
然后
pip install 'scipy==0.9.0'
惨遭失败,
raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
如何让它工作?
【问题讨论】:
-
嗯,你确定 pip 与
numpy=1.5.1而不是numpy==1.5.1(双等号)一起工作吗? -
我使用的是双等号,这是一个错字。我只是在这里输入而不是复制粘贴:)
-
除了 blas 和 lapack 您还需要安装
blas-devel和lapack-devel。这在文档中没有指定,但如果您想使用 PIP 安装,则必须这样做。 -
@IñigoHernáezCorres(blas-devel 和 lapack-devel)对于我们这些使用 amazon-linux 的人来说也是 YUMable。
标签: python numpy scipy pip apt