0
我试图用BeautifoulSoup使用lxml的解析器在我的Eclipse项目得到一个错误:使用LXML时BeauitfoulSoup
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版本。
如果你说'import lxml',会发生什么? –
它说:ImportError:没有名为'lxml'的模块 – sanjihan
那么我猜你没有安装lxml。所以这是真的。这更像是一个点子问题 - 我想 - 你可能想要编辑来反映这个和重新标记。 –