python-Couldn‘t find a tree builder with the features you requested: lxml

  执行BeautifulSoup(content, features='lxml')时报错,按照网上的方法安装lxml、重新安装lxml、安装指定版本lxml,都无效。

  最后发现只是PyCharm设置中project 的python interpreter中没有安装lxml,应该是PyCharm的运行环境跟主机的python组件有区别。

posted @ 2023-01-28 22:26  badwood  阅读(102)  评论(0编辑  收藏  举报
Badwood's Blog