1. 程式人生 > >[error:沒有解析庫]Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?

[error:沒有解析庫]Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?

error ted requested install lib you features builder all

將代碼拷貝到服務器上運行,發生錯誤提示需要新安裝parser library.
查看代碼中發現有以下內容:

soup = BeautifulSoup(open(fp), 'xml')

安裝解析庫即可:

pip install lxml

[error:沒有解析庫]Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?