python requests 离线_2020-07-02 离线安装python 2.7的requests模块

requests 是 Python 的一个 HTTP 客户端库,跟 urllib,urllib2 类似,不过 requests 的优势在于使用简单,相同一个功能,用 requests 实现起来代码量要少很多。毕竟官方文档都很直白的说:

python 的标准库 urllib2 提供了大部分需要的 HTTP 功能,但是 API 太逆天了,一个简单的功能就需要一大堆代码。

所以,使用 requests 方便的多。

参考pip在线安装

G:\Projects\github\hmac-auth-java-sdk\hmac-auth\jars>pip2 install requests

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

Looking in indexes: https://mirrors.aliyun.com/pypi/simple

Requirement already satisfied: requests in f:\python27\lib\site-packages (2.24.0)

Requirement already satisfied: idna<3,>=2.5 in f:\python27\lib\site-packages (from requests) (2.10)

Requirement already satisfied: certifi>=2017.4.17 in f:\python27\lib\site-packages (from requests) (2020.6.20)

Requirement already satisfied: chardet<4,>=3.0.2 in f:\python27\lib\site-packages (from requests) (3.0.4)

Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in f:\python27\lib\site-packages (from requests) (1.25.9)

WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.

You should consider upgrading via the 'python -m pip install --upgrade pip' command.

下载离线安装包

https://files.pythonhosted.org/packages/da/67/672b422d9daf07365259958912ba533a0ecab839d4084c487a5fe9a5405f/requests-2.24.0.tar.gz

随后解压并准备安装

错误的离线安装命令

F:\Python27\python.exe F:\Programs\requests-2.24.0\requests-2.24.0\setup.py install

报错readme.md找不到

G:\Projects\github\hmac-auth-java-sdk\hmac-auth\jars

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值