在Amazon Linux上安装Scipy时出错

从这个链接在Amazon Linux上安装scipy模块时,我一直面临这个错误:

(sk-learn)[root@ip-161-31-0-289 ec2-user]# pip install scipy 

++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++

/home/ec2-user/sk-learn/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2:warning:#warning“使用弃用的NumPy API,禁用它通过“”#定义NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION“[-Wcpp]

#warning“使用不推荐的NumPy API,通过”\

^

{标准input}:汇编器消息:

{standard input}:374818:警告:文件结尾不在行尾; 换行插入

{标准input}:错误:在文件末尾打开CFI; 缺less.cfi_endproc指令

g ++:内部编译错误:kill(程序cc1plus)

请提交完整的错误报告,

如果合适的话预处理源代码。

有关说明,请参阅http://bugzilla.redhat.com/bugzilla 。

错误:命令“g ++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector -param = ssp-buffer-size = 4 -m64 -mtune = generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector -param = ssp-buffer-size = 4 -m64 -mtune = generic -D_GNU_SOURCE – fPIC -fwrapv -fPIC -D__STDC_FORMAT_MACROS = 1 -Iscipy / sparse / sparsetools -I / home / ec2-user / sk-learn / local / lib / python2.7 / dist-packages / numpy / core / include -I / usr / include / python2.7 -c scipy / sparse / sparsetools / bsr.cxx -o build / temp.linux-x86_64-2.7 / scipy / sparse / sparsetools / bsr.o“失败,退出状态4

—————————————-清理… Command / home / ec2 exec(compile(getattr(tokenize,')'); /etc/rc.d/init.d/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/docs/index.jsp下载('\ r \ n','\ n'), file ,'exec'))“install –record / tmp / pip-SIVe3Y-record / install -record.txt –single-version-external-managed –compile –install-headers /home/ec2-user/sk-learn/include/site/python2.7失败,错误代码1在/ home / ec2-用户/ SK-学习/构build/ SciPy的

增加交换内存的工作

 dd if=/dev/zero of=/swapfile bs=128M count=8 mkswap /swapfile swapon /swapfile 

swapon -s会给你一个用法总结