相关疑难解决方法(0)

bs4.FeatureNotFound:找不到具有您请求的功能的树构建器:lxml.你需要安装解析器库吗?

...
soup = BeautifulSoup(html, "lxml")
File "/Library/Python/2.7/site-packages/bs4/__init__.py", line 152, in __init__
% ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
Run Code Online (Sandbox Code Playgroud)

以上输出在我的终端上.我在Mac OS 10.7.x上.我有Python 2.7.1,并按照本教程获得Beautiful Soup和lxml,它们都已成功安装并使用位于此处的单独测试文件.在导致此错误的Python脚本中,我包含了这一行: from pageCrawler import comparePages 在pageCrawler文件中,我包含以下两行: from bs4 import BeautifulSoup from urllib2 import urlopen

任何有关确定问题是什么以及如何解决问题的帮助都将不胜感激.

python lxml beautifulsoup python-2.7

175
推荐指数
11
解决办法
20万
查看次数

标签 统计

beautifulsoup ×1

lxml ×1

python ×1

python-2.7 ×1