Python Headers Must Create Mercurial

I did a step-by-step screencast from Kennethlow called "Getting Started with django" . I'm stuck in "Episode 6: General Views are Cheaper Than a Name." I am trying to install "django-annoying" which requires "Mercurial".

Im using OSX 10.8.2, and when I run on the terminal: pip install mercurial I get the message below.

  Downloading/unpacking mercurial Downloading mercurial-2.3.2.tar.gz (3.6MB): 3.6MB downloaded Running setup.py egg_info for package mercurial Python headers are required to build Mercurial Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/mercurial.egg-info writing pip-egg-info/mercurial.egg-info/PKG-INFO writing top-level names to pip-egg-info/mercurial.egg-info/top_level.txt writing dependency_links to pip-egg-info/mercurial.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/mercurial.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found Python headers are required to build Mercurial ---------------------------------------- Command python setup.py egg_info failed with error code 1 in /Users/gth158a/Sites/official/poll/build/mercurial Storing complete log in /Users/gth158a/.pip/pip.log 

I was looking for a solution, and the closest I found someone with the same problem in Ubuntu , but its proposed solution does not apply in my osx case.

From my research, I learned that the referenced headers are the "C headers" for creating the application. I installed packages that I found in pip that have C headers in their description but do not succeed at all. I would really appreciate it if you could point me in the right direction.

+7
source share
3 answers

Most likely, it is just that you do not have the command line tools installed.

The easiest way to install them is to open Xcode, go to Settings, tabs Downloads, Components → Command Line Tools (Install)

+12
source

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

 sudo apt-get install python-dev 

I think installing the same will help any taste of Linux.

+22
source

The pip will not help, because it installs python packages. Python headers are usually installed on the system. According to this , Xcode sets Python headers

+1
source

All Articles