Kallithea issues archive

Issue #131: Installing with pip fails: Python headers are required to build Mercurial but weren't found

Reported by: Thomas Käfer
State: resolved
Created on: 2015-05-05 13:52
Updated on: 2015-05-05 15:13

Description

Hi there! I'm trying to install Kallithea on a Centos 6.6 server.

I've installed:

yum install git mercurial python-pip python-pbr

(btw. it would be nice if the python-pbr requirement could be mentioned in http://docs.kallithea-scm.org/en/latest/overview.html )

pip install kallithea

now does fail for me with this error:

  Downloading/unpacking mercurial>=2.9,<3.4 (from kallithea)
  Downloading mercurial-3.4-rc.tar.gz (4.3MB): 4.3MB downloaded
  Running setup.py egg_info for package mercurial
    Python headers are required to build Mercurial but weren't found in /usr/include/python2.6/Python.h
    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 but weren't found in /usr/include/python2.6/Python.h

I don't know how to work around it. please help.

Attachments

Comments

Comment by Thomas Käfer, on 2015-05-05 13:53

Comment by Mads Kiilerich, on 2015-05-05 14:02

https://www.google.com/search?q=centos+python+headers will probably give a hint.

Contributions to the documentation is welcome. It is not feasible to give detailed instructions for every OS out there but the major families could perhaps be mentioned where relevant.

Comment by Thomas Käfer, on 2015-05-05 14:05

ah, okey. so I need the devel / dev package for python. well I guess one could call redhat+centos one of the major families in the linux distro tree. certainly not an exotic distro in my opinion..

Comment by Thomas Käfer, on 2015-05-05 14:13

okey. so I now managed to get through to the end, for future reference this is the complete list of packages I needed to install on my system to make pip install kallithea run through to the end:

yum install git mercurial python-pip python-pbr python-devel gcc

Comment by Thomas Käfer, on 2015-05-05 14:16

Comment by Andrej Shadura, on 2015-05-05 15:10

@kaefert, as I understand this, the fact you installed Mercurial using yum doesn't matter, as your distribution doesn't ship Mercurial version Kallithea depends on. So, basically, when you ran pip for Kallithea, it downloaded and installed yet another Mercurial (of a different version, though). And for that it required Python development package.

Comment by Thomas Käfer, on 2015-05-05 15:13

okey. thanks for the clarification!