title: Import lxml failed on CentOS release 6.7 (Final)
body: <p>I updatd python on centos6.7 to python2.7.3,and made the new version as default. Then I used <code>sudo yum install python-lxml</code> to install python-lxml. It shows</p>
  
  <p><code>package python-lxml-2.2.3-1.1.el6.x86_64 has been installed and is the newest,there is nothing to do</code></p>
  
  <p>But when I use python (the default 2.7.3) <code>python</code> and <code>import lxml</code>,error happens as follow
  <a href="https://i.stack.imgur.com/7PyPf.jpg" rel="nofollow noreferrer">ImportError: No module named lxml</a>.However when i use the older version python like <code>/usr/bin/python2.6</code> and <code>import lxml</code>,no error happens. The lxml works on the older version python. </p>
  
  <p>What's the problem?</p>
  
  <p>I tried many other ways:</p>
  
  <p><strong>1.</strong> Use pip to install lxml <code>sudo /usr/local/bin/pip install lxml</code>,but errors happen </p>
  
  <p><code>src/lxml/lxml.etree.c:237975: error：expected ‘)’ before ‘value’</code></p>
  
  <p><code>Compile failed: command 'gcc' failed with exit status 1</code></p>
  
  <pre><code>cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c 
  </code></pre>
  
  <p><code>/tmp/xmlXPathInitB69jpu.c -o tmp/xmlXPathInitB69jpu.o</code></p>
  
  <pre><code>/tmp/xmlXPathInitB69jpu.c:1:26: error：libxml/xpath.h：no such file or directory
  
  Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
  
  error: command 'gcc' failed with exit status 1
  </code></pre>
  
  <p><code>Command /usr/bin/python -c "import</code> 
  <code>setuptools;__file__='/home/zhoulipeng/software/lxml-3.4.4/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-VIpDJ1-record/install-record.txt failed with error code 1</code> <a href="https://i.stack.imgur.com/mGZuK.jpg" rel="nofollow noreferrer">4</a></p>
  
  <p>It seems libxml2 isn't installed, so I install all the dependences,<code>sudo yum install libxml2-devel libxslt-devel python-devel</code>,it shows:</p>
  
  <pre><code>package libxml2-devel-2.7.6-20.el6.x86_64 has been installed and is the newest
  package libxslt-devel-1.1.26-2.el6_3.1.x86_64 has been installed and is the newest
  package python-devel-2.6.6-64.el6.x86_64 has been installed and is the newest
  </code></pre>
  
  <p>That means I already installed the package libxml2.</p>
  
  <p><strong>2.</strong> Install lxml from source code </p>
  
  <p>When I build the source code with <code>sudo python setup.py build</code> ,it failed with
  <code>src/lxml/lxml.etree.c:201156:error:expected ')'before'__pyx_f_4lxml_5etree_xslt_doc_loader'</code>
   <code>error: command 'gcc' failed with exit status 1</code></p>
  
  <p>Can someone help me? thank you.</p>