While installing Readthedocs package inside Virtual Environement on Ubuntu 14.04 LTS , I found this error “Python headers are required to build Mercurial but weren’t found in /usr/include/python2.7/Python.h” . It seems the dependency issue with header files for python.
So what should be fix for this issue. It is very simple, we have to installed the python-dev package .
sudo apt-get update sudo apt-get install python-dev
Now try installing the packages again, I hope it will fix your issue too.
Did not work, waste of time
Note that for RedHat/Centos, it’s yum install python-devel
Thank you, it is very helpful for me!!!