我正在尝试使用AWS linux发行版在EC2实例中安装pandas以与Python34一起使用 .
我跑了:
sudo pip install pandas
我能够为python 2.7版本成功安装pandas但是当我运行时:
sudo python34 -m pip install pandas
我收到错误:
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED = 1 -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 -Ipandas / _libs / src / klib -Ipandas / _libs / src -I / usr / local / lib64 / python3.4 / site-packages / numpy / core / include -I /usr/include/python3.4m -c pandas / _libs / index.c -o build / temp.linux-x86_64-3.4 / pandas / _libs / index.o -Wno-unused-function pandas / _libs / index.c: 4:20:致命错误:Python.h:没有这样的文件或目录#include“Python.h”^编译终止 . 错误:命令'gcc'失败,退出状态为1
其次是:
Command "/usr/bin/python34 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zsa12w6w/pandas/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-svj_8okf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-zsa12w6w/pandas/
如何为python34版本成功安装pandas?