4

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

2
  • Solved it by increasing swap memory! Commented Nov 27, 2015 at 8:58
  • Please explain your solution by answering your own question. Add useful details to help other users who have a similar problem. Commented Nov 27, 2015 at 18:19

1 Answer 1

4

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.