bs4 FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml. Do you need to install a parser library?
使用了 pip install lxml 安装好了,却依旧报错
解决方法:
将:
bs4.BeautifulSoup(html, ‘lxml’)
改为
bs4.BeautifulSoup(html, ‘html.parser’)
来自stackflow的解答:
1.此于mac有关

2.对我的问题有效的方案

3.其他

博客指出使用Python时,安装lxml后仍出现bs4 FeatureNotFound报错。解决方法是将bs4.BeautifulSoup(html, ‘lxml’)改为bs4.BeautifulSoup(html, ‘html.parser’),还提及来自stackflow的解答,包括与mac有关等内容。
3万+

被折叠的 条评论
为什么被折叠?



