Error installing Pandas on AWS

I am following the steps below to install pandas on AWS micro instance (its platform is Amazon Linux). I SSH to an AWS instance and run the below commands to install the dependencies.

$sudo yum install gcc
$sudo yum install gcc-c++
$ sudo pip install numpy
$ sudo yum install python-devel
$ sudo yum install pytz

      

I am getting error like below

    pandas/src/klib/khash_python.h:49:1: note: in expansion of macro ‘KHASH_MAP_INIT_STR’

 KHASH_MAP_INIT_STR(strbox, kh_pyobject_t)

 ^

{standard input}: Assembler messages:

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

{standard input}:107394: Error: number of operands mismatch for `mov'

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

gcc: internal compiler error: Killed (program cc1)

Please submit a full bug report,

with preprocessed source if appropriate.

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

error: command 'gcc' failed with exit status 4

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

      

+3


source to share


1 answer


Most likely you are running out of memory. Try to make a swap file - this worked for me:



sudo dd if=/dev/zero of=/swapfile bs=1024 count=524288
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo pip install pandas

      

+1


source







All Articles