title: How to install lxml on Ubuntu
body: <p>I'm having difficulty installing lxml with easy_install on Ubuntu 11.</p>
  
  <p>When I type <code>$ easy_install lxml</code> I get:</p>
  
  <pre><code>Searching for lxml
  Reading http://pypi.python.org/simple/lxml/
  Reading http://codespeak.net/lxml
  Best match: lxml 2.3
  Downloading http://lxml.de/files/lxml-2.3.tgz
  Processing lxml-2.3.tgz
  Running lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGy
  Building lxml version 2.3.
  Building without Cython.
  ERROR: /bin/sh: xslt-config: not found
  
  ** make sure the development packages of libxml2 and libxslt are installed **
  
  Using build configuration of libxslt 
  In file included from src/lxml/lxml.etree.c:227:0:
  src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <p>It seems that <code>libxslt</code> or <code>libxml2</code> is not installed. I've tried following the instructions at <a href="http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php" rel="noreferrer">http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php</a> and <a href="http://www.techsww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php" rel="noreferrer">http://www.techsww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php</a> with no success.</p>
  
  <p>If I try <code>wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.6.27.tar.gz</code> I get</p>
  
  <pre><code>&lt;successful connection info&gt;
  ==&gt; SYST ... done.    ==&gt; PWD ... done.
  ==&gt; TYPE I ... done.  ==&gt; CWD (1) /libxml2 ... done.
  ==&gt; SIZE libxml2-sources-2.6.27.tar.gz ... done.
  ==&gt; PASV ... done.    ==&gt; RETR libxml2-sources-2.6.27.tar.gz ... 
  No such file `libxml2-sources-2.6.27.tar.gz'.
  </code></pre>
  
  <p>If I try the other first, I'll get to <code>./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2</code> and that will fail eventually with:</p>
  
  <pre><code>checking for libxml libraries &gt;= 2.6.27... configure: error: Could not find libxml2 anywhere, check ftp://xmlsoft.org/.
  </code></pre>
  
  <p>I've tried both versions <code>2.6.27</code> and <code>2.6.29</code> of <code>libxml2</code> with no difference.</p>
  
  <p>Leaving no stone unturned, I have successfully done <code>sudo apt-get install libxml2-dev</code>, but this changes nothing.</p>