安装 Requests 网络库
安装网络库的前提是在安装好 Python 库前提之下进行的,安装好后在命令行执行如下命令
pip install requests
命令执行结束后,如何验证 Requests 库是否正确安装呢?
C:\Users\Administrator>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD6
4)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get('http://www.baidu.com')
<Response [200]>
>>>
如上最后输出结果为 <Re