I am using CentOS 6.5 and want to use newer versions of Python, lxml, libxml2 and libxslt2 than what's available from the repos.
So I build libxml2, libxslt2 and python 2.7.8 from scratch, and add all the binary paths to my $PATH. "xml2-config --cflags --libs" includes the correct (custom) locations of libxml libraries and includes.
I configure/make/make install python-2.7.8 to my home directory, add its bin to my path. Install setuptools by "python setup.py install", followed by easy_install pip.
Finally, pip install lxml ... This finds my correct locations of libxml.
However, 'from lxml import etree' fails because it expects my newer version of libxml but it looks at /usr/lib64/libxml and fails.
Why is it not detecting my libxml location? It detects it when installing lxml, but not when importing it?
ImportError: /usr/lib64/libxml2.so.2: version `LIBXML2_2.9.0' not found (required by /home/hsundara/packages_installed/python-2.7.8/lib/python2.7/site-packages/lxml/etree.so)
But when building -
Building against libxml2/libxslt in one of the following directories: