Python3安裝lxml

pip3 install lxml

如果使用國外的源下載速度慢,我們可以使用國內的源進行提速:

  • 豆瓣源
    pip3 install lxml -i https://pypi.douban.com/simple
    
  • 清華大學源
    pip3 install lxml -i https://pypi.tuna.tsinghua.edu.cn/simple
    

如果不安裝lxml庫,則在使用時會提示:

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章