如何离线安装python的requests库
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,这篇文章给大家分享的是有关如何离线安装python的requests库的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1、下载安装包1.1 检查requests模块所需依赖包
千家信息网最后更新 2026年11月02日如何离线安装python的requests库
这篇文章给大家分享的是有关如何离线安装python的requests库的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
1、下载安装包
1.1 检查requests模块所需依赖包
在可以上网且已经安装python的机器上检查requests模块需要哪些依赖包,如果这些依赖包未安装,直接安装requests也不能使用。
使用命令:
pip show requests
发现需要chardet,idna,urllib3,certifi
检查这几个包是否已安装,如果未安装,则也需要手工安装。
1.2 下载requests所需依赖包
在网站 https://www.lfd.uci.edu/~gohlke/pythonlibs 上找到相应的程序,下载并传输至目标机器。
1.3 下载requests包
从github下载requests源码包并传输至目标机器。
https://github.com/kennethreitz/requests
将requests-master.zip解压到python的安装目录中
2、安装
2.1 安装requests所需依赖包
安装命令为
pip install xx.whl
下图中最后一个是正常安装成功,前面三个有报错信息,目前暂时忽略,因为经过验证没有影响requests安装。
D:\python-lib>pip install urllib3-1.26.8-py2.py3-none-any.whlProcessing d:\python-lib\urllib3-1.26.8-py2.py3-none-any.whlInstalling collected packages: urllib3ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts. We recommend you use --use-feature=2020-resolver to test your packages with thenew resolver before it becomes the default. requests 2.25.1 requires certifi>=2017.4.17, which is not installed.requests 2.25.1 requires chardet<5,>=3.0.2, which is not installed.requests 2.25.1 requires idna<3,>=2.5, which is not installed.Successfully installed urllib3-1.26.8 D:\python-lib>pip install chardet-4.0.0-py3-none-any.whlProcessing d:\python-lib\chardet-4.0.0-py3-none-any.whlInstalling collected packages: chardetERROR: After October 2020 you may experience errors when installing or updatingpackages. This is because pip will change the way that it resolves dependency conflicts. We recommend you use --use-feature=2020-resolver to test your packages with thenew resolver before it becomes the default. requests 2.25.1 requires certifi>=2017.4.17, which is not installed.requests 2.25.1 requires idna<3,>=2.5, which is not installed.Successfully installed chardet-4.0.0 D:\python-lib>pip install certifi-2019.11.28-py2.py3-none-any.whlProcessing d:\python-lib\certifi-2019.11.28-py2.py3-none-any.whlInstalling collected packages: certifiERROR: After October 2020 you may experience errors when installing or updatingpackages. This is because pip will change the way that it resolves dependency conflicts. We recommend you use --use-feature=2020-resolver to test your packages with thenew resolver before it becomes the default. requests 2.25.1 requires idna<3,>=2.5, which is not installed.Successfully installed certifi-2019.11.28 D:\python-lib>pip install idna-2.8-py2.py3-none-any.whlProcessing d:\python-lib\idna-2.8-py2.py3-none-any.whlInstalling collected packages: idnaSuccessfully installed idna-2.8 D:\python-lib>
2.2 安装requests
在解压好的equests-master目录下打开cmd(或者cmd中切换目录至该路径)
输入命令开始安装
python setup.py install
3、检查是否安装成功
在python中使用import requests查看
感谢各位的阅读!关于"如何离线安装python的requests库"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
检查
命令
机器
目录
成功
内容
更多
模块
目标
篇文章
传输
不错
实用
三个
下图
信息
手工
文章
源码
看吧
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
科技和互联网公司
科技互联网政务服务
互联网科技卖菜
互联网前沿科技
人人互联网科技是培训
太原新华互联网科技学校怎么样
互联网科技公司招聘
重庆互联网医院沙龙医盟信息科技
赶超互联网科技 微信多开
洛阳昕诺飞互联网科技有限公司
广州新华互联网科技学校电竞方面
互联网科技圈年度人物
国大互联网教育科技有限公司薪资
美国互联网科技实力
产业互联网科技服务公司
福州德业互联网科技
江苏互联网智能科技产品出厂价
互联网科技平台产品运营
互联网科技职业技能培训学校
互联网时代高科技布局
湖北九亚互联网络科技有限公司
深圳恒合互联网络科技有限公司
互联网为科技
卫星互联网科技股票
千方科技属于互联网企业吗
阿大互联网科技有限公司
江阴互联网智能科技产品进口
洛阳共同富裕互联网科技有限公司
神州科技互联网有限公司
米泉互联网科技专业怎么样