python - 在 cygwin 中安装 scipy

标签 python scipy cygwin

我无法使用我尝试过的任何方法(pip,直接源代码)在 cygwin(32 位)中安装 scipy。这是我得到的错误

from scipy/spatial/ckdtree/src/ckdtree_globals.cxx:9:
    /usr/lib/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1629:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
     _import_array(void)
     ^
    error: Command "g++ -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/include/python2.7 -I/usr/lib/python2.7/site-packages/numpy/core/include -Iscipy/spatial/ckdtree/src -I/usr/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c scipy/spatial/ckdtree/src/ckdtree_globals.cxx -o build/temp.cygwin-2.2.0-i686-2.7/scipy/spatial/ckdtree/src/ckdtree_globals.o" failed with exit status 1 

这之前也有很多警告。在 cygwin 上使用 scipy 的正确方法是什么。我还看了scipy官方网站http://www.scipy.org/scipylib/building/windows.html但我发现有点难以理解。但是,如果这是最简单的方法并且今天仍然有效,我愿意尝试。

最佳答案

我在 64 位 cygwin 中的 scipy 0.16.0 上遇到了完全相同的错误。

但是安装 0.15.0 对我有用:

$ pip install scipy==0.15.0

有点烦人,但目前可能是一个合理的解决方案。

关于python - 在 cygwin 中安装 scipy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31846330/

相关文章:

Python 正则表达式 : Match 1 or 2 digits, 返回最长

python - threading.timer 在 python 中如何工作

python - scipy.signal.sepfir2d 中的类型错误

python - 如何阻止 numpy meshgrid 将默认数据类型设置为 int64

c++ - 配置 Eclipse CDT 以使用 g++

python - 以持久的方式存储 Python 的模拟结果?

python - 如何将大量数据发布到 Django?

python - `numpy.diff` 和 `scipy.fftpack.diff` 在微分时给出不同的结果

如果我不使用 Code::Blocks 但使用 cygwin 进行编译,c++ compare std::string 将不起作用

带有 Cygwin 和 MinTTY 的 Unicode 不起作用