sam*_*sam 2 python lxml pip beautifulsoup raspberry-pi
我在安装lxml软件包后尝试安装BeautifulSoup4软件包.
在终端i中键入:
sudo pip install lxml
Run Code Online (Sandbox Code Playgroud)
这就是我得到的
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
Run Code Online (Sandbox Code Playgroud)
然后它在最后一行停留很长一段时间,我必须按下退出CTRL+C.
有人能告诉我它的真正含义吗?
然后我试着pip freeze看看是否安装了包.不,它不存在.
好吧你可以打开python并尝试导入它.但如果它的python 3试试这个
sudo apt-get install python3-lxml
Run Code Online (Sandbox Code Playgroud)
否则它
sudo apt-get install python-lxml
Run Code Online (Sandbox Code Playgroud)