psutil/_psutil_linux.c fatal error: Python.h: No such file or directory

Recently while trying to install recent version of psutil I got following error:

psutil/_psutil_linux.c:12:20: fatal error: Python.h: No such file or directory
compilation terminated.

After debugging about the issue for a while I got to know that to install psutil recent version, it required python-dev module pre installed.

Use following command to install python-dev

$ sudo apt-get install python-dev

After installing python-dev psutil got installed without any issue.

Advertisements

3 comments on “psutil/_psutil_linux.c fatal error: Python.h: No such file or directory

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s