[Fixed]-Python headers are required to build Mercurial

12👍

Most probably is just that you don’t have the Command Line Tools installed.

The easiest way to install them is to open Xcode go to preferences, Downloads, Components tab –> Command Line Tools (Install)

27👍

I had the same problem on Ubuntu. I installed the “python-dev” package using following command..

sudo apt-get install python-dev

I think installing the same would help for any flavour of Linux.

1👍

Pip won’t help because it installs python packages. The Python headers are usually installed system-wide. According to this XCode installs the Python headers

Leave a comment