[Python] windows下beautifulsoup使用lxml解析使用报错

s4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

这个很明显是没有安装lxml导致,各大社区看了一下,lxml的安装好像真的没有其他库那么方便。直接cmd安装会导致这个!

弄了大半天才成功运行,答题步骤如下:

#1下载lxml,注意python版本相对应

#2 cmd命令下,输入pip3 install wheel 用于安装后面的.whl文件

#3 找到已经下载好lxml文件所在的文件夹运行cmd 执行 pip install lxml-****.whl

#4 没有报错,成功,在pip list下就可以看到版本了

 

网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

版本选择:64位,python3.6

大吉大利!

顺便贴下自己拿到的数据

 

posted @ 2018-11-13 11:06  FuluoQued  阅读(716)  评论(0编辑  收藏  举报