我使用以下方法为PyPy创建了virtualenv:
virtualenv test -p `which pypy` source test/bin/activate
我安装了以下依赖项:
sudo apt-get install python-dev libxml2 libxml2-dev libxslt-dev
然后我运行:
pip install --upgrade pypy
结果,我收到了很多如下所示的错误:
src/lxml/lxml.etree.c:234038:22: error: `PyThreadState` {aka struct _ts}` has no member named `use_tracing`
如何为PyPy 2.6.0正确安装lxml?
我将以下lxml的分叉用于PyPy:
https://github.com/aglyzov/lxml/tree/cffi
它可以安装:
pip install -e git+git://github.com/aglyzov/lxml.git@cffi#egg=lxml-cffi