我在安装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
查看是否已安装该软件包。不,它不存在。
答案 0 :(得分:7)
你可以打开python并尝试导入它。但如果它的python 3尝试这个
sudo apt-get install python3-lxml
其他
sudo apt-get install python-lxml