raspberry pi无法安装lxml pip包

时间:2016-08-05 05:52:07

标签: python beautifulsoup raspberry-pi pip lxml

我在安装lxml软件包之后尝试安装BeautifulSoup4软件包。

在终端i中输入:

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 退出。

有人可以告诉我它的真正含义吗?

然后我尝试pip freeze查看是否已安装该软件包。不,它不存在。

1 个答案:

答案 0 :(得分:7)

你可以打开python并尝试导入它。但如果它的python 3尝试这个

sudo apt-get install python3-lxml

其他

sudo apt-get install python-lxml