How to install lxml for PyPy?

a 夏天 提交于 2019-12-14 00:25:38

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/34166494/how-to-install-lxml-for-pypy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!