bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.

我刚开始学些爬虫,用的是Pycharm编译器,在爬虫的时候用到了BeautifulSoup,里面涉及到lxml,如下图所示:
bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
运行之后便报如下错误:bs4.FeatureNotFound: Couldn’t find a tree builder with the features you requested: lxml.
百度过后才发现,这里报错的意思是:你的开发环境下下载的包里不存在你需要的lxml,目录下有没有你需要的包,如果没有就安装一个。就是这么简单。
bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
所以对于使用Pycharm的人来说,通过File->Setting->Project Interpreter,右边的**+** 号,导入lxml之后,便可以成功运行。
如下所示:
bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
导入之后再运行,便可以成功了。
如果不是Pycharm编译器的话,单纯用python直接跑的话,也可以通过cmdpip3 install lxml直接进行下载。之后应该也可以成功。

bs4.FeatureNotFound: Couldn‘t find a tree builder with the features you requested: lxml.
如果可以的话,帮我点个赞 !♥ !