Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install lxml for PyPy?

Tags:

pypy

lxml

I've created a virtualenv for PyPy with:

virtualenv test -p `which pypy`
source test/bin/activate

I installed the following dependencies:

sudo apt-get install python-dev libxml2 libxml2-dev libxslt-dev

And then I run:

pip install --upgrade pypy

As a result I get a lot of errors looking like this:

src/lxml/lxml.etree.c:234038:22: error: `PyThreadState` {aka struct _ts}` has no member named `use_tracing`

How do I properly install lxml for PyPy 2.6.0?

like image 313
Overv Avatar asked Sep 02 '25 17:09

Overv


1 Answers

I used the following fork of lxml for PyPy instead:

https://github.com/aglyzov/lxml/tree/cffi

It can be installed with:

pip install -e git+git://github.com/aglyzov/lxml.git@cffi#egg=lxml-cffi
like image 115
Overv Avatar answered Sep 05 '25 21:09

Overv