我按照以下步骤在AWS微实例中安装pandas(他的平台是Amazon Linux)。我通过SSH连接到AWS实例并运行以下命令来安装依赖项。
$sudo yum install gcc
$sudo yum install gcc-c++
$ sudo pip install numpy
$ sudo yum install python-devel
$ sudo yum install pytz
我收到如下错误
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
答案 0 :(得分:1)
你很可能内存不足。尝试制作交换文件 - 它对我有用:
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