繁体   English   中英

python pip install scipy错误

[英]python pip install scipy error

pip install scipy出现错误,所有情况都已安装。任何人都可以告诉我发生了什么。 操作系统:Linux iZ25qaqvf80Z 2.6.32-220.23.2.al.ali1.1.alios6.x86_64#1 SMP Sun Jan 4 15:01:53 CST 2015 x86_64 x86_64 x86_64 GNU / Linux

    >>pip install scipy
    Collecting scipy
      Using cached scipy-0.16.0.tar.gz
    Installing collected packages: scipy
      Running setup.py install for scipy

    ....
    ....
    ....

    creating build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools
    compile options: '-D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/local/include/python2.7 -c'
    g++: scipy/sparse/sparsetools/sparsetools.cxx
    In file included from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1804,
                     from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17,
                     from scipy/sparse/sparsetools/sparsetools.cxx:34:
    /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
    g++: scipy/sparse/sparsetools/csr.cxx
    In file included from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1804,
                     from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17,
                     from scipy/sparse/sparsetools/sparsetools.h:5,
                     from scipy/sparse/sparsetools/csr.cxx:4:
    /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
    g++: scipy/sparse/sparsetools/bsr.cxx
    In file included from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1804,
                     from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17,
                     from scipy/sparse/sparsetools/sparsetools.h:5,
                     from scipy/sparse/sparsetools/bsr.cxx:4:
    /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
    g++: Internal error: Killed (program cc1plus)
    Please submit a full bug report.
    See <http://bbs.aliyun.com> for instructions.
    In file included from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1804,
                     from /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17,
                     from scipy/sparse/sparsetools/sparsetools.h:5,
                     from scipy/sparse/sparsetools/bsr.cxx:4:
    /usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
    g++: Internal error: Killed (program cc1plus)
    Please submit a full bug report.
    See <http://bbs.aliyun.com> for instructions.
    error: Command "g++ -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/usr/local/lib/python2.7/site-packages/numpy-1.9.2-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/local/include/python2.7 -c scipy/sparse/sparsetools/bsr.cxx -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/bsr.o" failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-CO2sfG/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LWP6FE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-CO2sfG/scipy

也许您可以sudo apt-get install python-scipy ,我今天遇到了同样的问题。

尝试使用sudo pip install scipy

通过创建1G交换区解决了此问题,谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM