Building lxml on Centos 6
BackgroundI seem to find lots of issues with building lxml. I find it annoying to search and not find a good answer. Then there are so many ways to install python modules : tar file/make, easy_install, pip, etc, rpms. I found that my favorite flavor to install for now is pip.
InstallationIf you performed a previous installation please rm -rf /tmp/pip-build-[username]. This will save you alot of grief.
Install epel repo
rpm -Uhv http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Install required rpm
yum install gcc python-pip python-devel libxml2-devel libxslt-devel zlib-devel -y
pip install lxml
$ pip list
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml