Monday, August 31, 2015

error: Python.h: No such file or directory

Okay guys so I was trying to install locust using pip and the installation was failing due to the following error.

"error: Python.h: No such file or directory"

Found out that the python devel package was not installed and hence the error. So I installed the devel package and voila.. things were back on track :)

So in general if you find that something.h file is missing or not found, it usually means that the devel packages are not installed.

#yum install python-devel

Hope this helps someone :)

2 comments:

  1. A good pointer to what I needed.

    For Ubuntu/Debian, use
    sudo apt-get install python-dev

    and for openSuse, install python3-devel

    ReplyDelete