[英]how to install lxml with pypy in virtualenv
I am trying to use pypy in a virtualenv for better performance in running my python program. 我试图在virtualenv中使用pypy,以便在运行我的python程序时获得更好的性能。 I was able to install all the required modules, except for
lxml
我能够安装所有必需的模块,
lxml
除外
So far, I tried 到目前为止,我试过了
pip install lxml
Also tried 也试过了
pip install --upgrade lxml
It shows the following message at the end: 它在结尾处显示以下消息:
Successfully installed lxml-3.4.4
However, when I start pypy prompt and try to import lxml, I get the error: 但是,当我启动pypy提示并尝试导入lxml时,我收到错误:
(venv)➜ pypy pypy
Python 2.7.3 (2.2.1+dfsg-1ubuntu0.2, Dec 02 2014, 23:00:55)
[PyPy 2.2.1 with GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``denial is rarely a good debugging
technique''
>>>> import lxml
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named lxml
>>>> from lxml import html
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named lxml
Update: 更新:
I am using ubuntu 14.04 我正在使用ubuntu 14.04
Also, I have tried 另外,我试过了
sudo apt-get install pypy-dev
I had a similar problem. 我遇到了类似的问题。 I got it working by running
sudo apt-get install python-dev libxml2 libxml2-dev libxslt-dev
and then pip install --upgrade lxml
我通过运行
sudo apt-get install python-dev libxml2 libxml2-dev libxslt-dev
,然后pip install --upgrade lxml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.