我正在尝试使用BeautifoulSoup在我的eclipse项目中使用lxml解析器:
bsObj = BeautifulSoup(html,'lxml')
我跑了:STATIC_DEPS=true pip install lxml --user
并得到了结果:Successfully installed lxml-3.7.1
。
由于我收到错误,我的计算机似乎无法识别lxml解析器:
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
知道我错过了什么吗?
我是OSX,安装了python3和python2x版本。
答案 0 :(得分:0)
运行pip3 install --upgrade pip
(pip install --upgrade pip
)后运行不够,STATIC_DEPS=true pip3 install lxml --user
lxml解析器正常运行。