我创建了一个运行RHEL的EC2实例,我在其中进行SSH连接并创建了python3.4
虚拟环境。在环境中,我尝试像这样安装pandas
:
pip install pandas
我收到此错误
pandas/_libs/tslibs/timezones.c:4:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pandas
看了here之后,我跑了这个:
sudo yum install python-devel
此软件包已成功安装:
Package python26-devel-2.6.9-2.89.amzn1.x86_64 already installed and latest version
但是,错误仍然存在。
我的操作系统版本是:
NAME="Amazon Linux AMI"
VERSION="2017.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2017.09"
有关如何解决此错误的任何想法?