Unable to install some pip packages

Solution Verified - Updated -

Issue

Installation of some pip packages fails with various errors like:

    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.

Environment

  • Red Hat Enterprise Linux 7
  • python3 or Red Hat SCL python27 or rh-python36

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content