用BeautifulSoup时报错:
BeautifulSoup(html, features='lxml')
bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml. Do you need to install a parser library?
原因是需要安装lxml及相关依赖.
1、安装依赖
sudo apt-get install libxml2-dev libxslt-dev
2、安装lxml
sudo apt-get install python3-lxml
3、pip安装lxml
pip3 install lxml
参考信息
[1] : lxml.de