树莓派无法安装lxml pip包 [英] raspberry pi unable to install lxml pip package

查看:50
本文介绍了树莓派无法安装lxml pip包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装 BeautifulSoup4 包后尝试安装 lxml 包.

I am trying to install lxml package after i installed BeautifulSoup4 package.

在终端输入:

sudo pip install lxml

这是我得到的

sudo pip install lxml
Downloading/unpacking lxml
  Running setup.py egg_info for package lxml
    Building lxml version 3.6.1.
    Building without Cython.
    Using build configuration of libxslt 1.1.26
    Building against libxml2/libxslt in the following directory: /usr/lib

Installing collected packages: lxml
  Running setup.py install for lxml
    Building lxml version 3.6.1.
    Building without Cython.
    Using build configuration of libxslt 1.1.26
    Building against libxml2/libxslt in the following directory: /usr/lib
    building 'lxml.etree' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-armv9l-2.7/src/lxml/lxml.etree.o -w

然后它就在最后一行挂了很长时间,我必须按CTRL+C退出.

And then it just hangs there at the last line for a very long long time, I have to exit by pressing CTRL+C.

谁能告诉我这到底是什么意思?

Can someone tell me what it really means?

然后我尝试 pip freeze 以查看是否安装了软件包.不,它不在那里.

I then try pip freeze to see if the package is installed. No, it is not there.

推荐答案

好吧,您可以打开 python 并尝试导入它.但如果它的 python 3 试试这个

well you could open python and try importing it. But if its python 3 try this

sudo apt-get install python3-lxml

否则它的

sudo apt-get install python-lxml

这篇关于树莓派无法安装lxml pip包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆