0

I created an EC2 instance running RHEL, I SSH-ed into it and I created python3.4 virtual environment. Within the environment, I tried to install pandas like this:

pip install pandas

I am getting this error

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

After looking here, I ran this:

sudo yum install python-devel

This package is installed successfully:

Package python26-devel-2.6.9-2.89.amzn1.x86_64 already installed and latest version

However, the error persists.

My OS version is:

NAME="Amazon Linux AMI"
VERSION="2017.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2017.09"

Any idea about how this error could be solved?

bsky
  • 17,746
  • 43
  • 135
  • 250
  • 3
    Looks like the `yum install python-devel` installs some `Python2.6` and you want it to be `Python3.4`. Maybe wrong versions? – alisianoi Dec 30 '17 at 17:56

0 Answers0