我为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?
答案 0 :(得分:4)
我使用以下的lxml派对代替PyPy:
https://github.com/aglyzov/lxml/tree/cffi
可以安装:
var coordx = move.coordinates.x;
var coordy = move.coordinates.y;
if ((coordx >= 0 && coordx <= 2) && (coordy >= 0 && coordy <=2)) {
// do something
}