Python raspberry pi无法安装lxml pip包
在安装了Python raspberry pi无法安装lxml pip包,python,beautifulsoup,raspberry-pi,pip,lxml,Python,Beautifulsoup,Raspberry Pi,Pip,Lxml,在安装了BeautifulSoup4软件包之后,我正在尝试安装lxml软件包 在终端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
BeautifulSoup4
软件包之后,我正在尝试安装lxml
软件包
在终端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
查看是否安装了该软件包。不,它不在那里。您可以打开python并尝试导入它。但是如果是Python3,请尝试以下方法
sudo apt-get install python3-lxml
否则它
sudo apt-get install python-lxml
这意味着您所使用的设备的硬件非常有限,因此编译程序可能需要很长时间。如果你在编译过程中退出,它并没有被意外地安装。在我的Raspberry Pi上,编译器崩溃说:“ARM Linux GNUEABIHF GCC:内部编译器错误:被杀死(程序cc1)”可能是由于内存不足,我不知道(还)。.当我使用
pip
安装lxml
时,我的树莓pi冻结了,但在使用apt get
进行安装后,它工作了。非常感谢:)