python ImportError: No module named 'requests'

 

python,安装了python3.6.5的环境后,在网上下载了一个python文件运行的时候,提示ImportError: No module named 'requests'(找不到requests模块)。

爬虫用

 

requests介绍:requests是python的一个HTTP客户端库,跟urllib,urllib2类似,那为什么要用requests而不用urllib2呢?官方文档中是这样说明的:python的标准库urllib2提供了大部分需要的HTTP功能,但是API太逆天了,一个简单的功能就需要一大堆代码。

 

①cmd 

②cd D:/Python       //进入D盘  cd命令进入python安装目录

pip install requests     //使用pip 安装

等待系统自动加载安装

pip安装bs4

pip install beautifulsoup4

pip安装 xlwt

pip install xlwt

pip install xlrd

 

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

原因 :bs4调用了python自带的html解析器

pip安装lxml

pip install lxml

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值