1. 程式人生 > >Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

res requested tro fin IT html str 成功 color

python3.6.3

我在處理爬蟲時候使用BeautifulSoup中遇到報錯

“ bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml. Do you need to install a parser library? ”

在查閱資料中偶遇一種簡單的解決方式:把代碼中的‘lxml‘改成‘html.parser‘後成功解決。

Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?