采用pycharm爬取数据-基于百度

声明:采用pycharm爬取数据,安装库出现的问题。遇到错误提示:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

过程错误

1.采用Pycharm安装BeautifulSoup、和lxml库,装不上去。没办法采用pip方法,window系统中ctrl+R,然后输入cmd,进入运行界面:

pip install BeautifulSoup
结果:
在这里插入图片描述
出错信息:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决方案:(参阅相关资料)
pip install --user pytest-runner;
Note:我的电脑不这个方法不行,需要采用的指令是:
pip3 install --user pytest-runner;在这里插入图片描述
2.然后安装BeautifulSoup:
采用:pip install beautifulsoup
出现错误:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
在这里插入图片描述
改采用:pip install beautifulsoup4
在这里插入图片描述

下面的代码:

参考文章:https://blog.csdn.net/qq_40774175/article/details/81273198
需要安装的库:
pip install BeautifulSoup
pip insatll requests
pip install lxml
代码ÿ


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部