我无法使用我尝试过的任何方法(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/