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?python

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

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

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

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

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

#4 没有报错,成功,在pip list下就能够看到版本了get

 

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

版本选择:64位,python3.6it

大吉大利!pip

顺便贴下本身拿到的数据

相关文章
相关标签/搜索