bs4.FeatureNotFound:找不到具有您請求的功能的樹構建器:lxml。您需要安裝解析器庫嗎?

| | | | |
...soup = BeautifulSoup(html, "lxml") File "/Library/Python/2.7/site-packages/bs4/__init__.py",第 152 行,在 __init__ % ";".join (功能)) bs4.FeatureNotFound:找不到具有您請求的功能的樹構建器:lxml。您需要安裝解析器庫嗎?

我的終端上的上述輸出。我在 Mac OS 10.7.x 上。我有 Python 2.7.1,並遵循 this tutorial 獲得 Beautiful Soup 和 lxml,它們都成功安裝並使用單獨的測試文件 位於此處。在導致此錯誤的 Python 腳本中,我包含以下行:from pageCrawler import comparePages 在 pageCrawler 文件中,我包含以下兩行:from bs4 import BeautifulSoup from urllib2 import urlopen

任何幫助找出問題所在以及如何解決能解決的不勝感激。

bs4.FeatureNotFound:找不到具有您請求的功能的樹構建器:lxml。您需要安裝解析器庫嗎? find: Questions

bs4.FeatureNotFound:找不到具有您請求的功能的樹構建器:lxml。您需要安裝解析器庫嗎? iat: Questions

Shop

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

News

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method