user3550694
user3550694

Reputation: 81

Error while installing Scipy on Amazon Linux

I've been facing this error while installing scipy module on Amazon Linux from this link:

(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 "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

#warning "Using deprecated NumPy API, disable it by " \

^

{standard input}: Assembler messages:

{standard input}:374818: Warning: end of file not at end of a line; newline inserted

{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive

g++: internal compiler error: Killed (program cc1plus)

Please submit a full bug report,

with preprocessed source if appropriate.

See http://bugzilla.redhat.com/bugzilla for instructions.

error: Command "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" failed with exit status 4

---------------------------------------- Cleaning up... Command /home/ec2-user/sk-learn/bin/python27 -c "import setuptools, tokenize;file='/home/ec2-user/sk-learn/build/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-SIVe3Y-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ec2-user/sk-learn/include/site/python2.7 failed with error code 1 in /home/ec2-user/sk-learn/build/scipy

Upvotes: 4

Views: 663

Answers (1)

gkatzioura
gkatzioura

Reputation: 2820

Increasing swap memory does the work

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

swapon -s will give you a usage summary

Upvotes: 4

Related Questions