Skip to content

Instantly share code, notes, and snippets.

@flavianmissi
Last active January 24, 2016 10:42
Show Gist options
  • Save flavianmissi/6426108 to your computer and use it in GitHub Desktop.
Save flavianmissi/6426108 to your computer and use it in GitHub Desktop.
Building and installing lxml with pypy2.1.0 and python 2.7.3 (ubuntu 13.04)

Bootstrap

Follow Andrews' post to install PyPy: andrewsmedina.com/2013/07/28/introducao-ao-pypy/

Create a virtualenv (I'm using virtualenvwrapper) with pypy executable:

  $ mkvirtualenv lxml-pypy -p /path/to/bin/pypy

Clone the lxml fork that is using cffi instead of Cython:

  $ git clone https://github.com/amauryfa/lxml.git

Resolving Dependencies

You'll need to install the following packages to build lxml (with both, Python or PyPy):

  $ [sudo] apt-get install libxml2 libxslt1-dev zlib1g-dev

Building lxml

cd into the lxml repository and run:

  $ git checkout origin/cffi
  $ python setup.py build
  $ python setup.py install

Done!

@msva
Copy link

msva commented Jan 22, 2016

@ruipacheco I've same errors (actually, lot more of them), and I definitelly installed deps.
// although, maybe there is too fresh versions, including gcc

@lopuhin
Copy link

lopuhin commented Jan 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment