0

I am trying to install the package pickle5 on linux using the command pip3 install --user pickle5 but when I do I get the error

pickle5/compat.h:1:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

and I cannot figure out why...

1 Answers1

0

Depending of your distro, you need to install this before:

For apt (Ubuntu, Debian...):

sudo apt-get install python-dev   # for python2.x installs
sudo apt-get install python3-dev  # for python3.x installs

For yum (CentOS, RHEL...):

sudo yum install python-devel    # for python2.x installs
sudo yum install python3-devel   # for python3.x installs

Then it should work.

You have more information here

aldegalan
  • 480
  • 2
  • 12