python3添加requests库

1、资源下载

https://codeload.github.com/psf/requests/zip/master

https://www.python.org/

https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz

https://files.pythonhosted.org/packages/a5/74/05ffd00b4b5c08306939c485869f5dc40cbc27357195b0a98b18e4c48893/urllib3-1.24.tar.gz

https://files.pythonhosted.org/packages/65/c4/80f97e9c9628f3cac9b98bfca0402ede54e0563b56482e3e6e45c43c4935/idna-2.7.tar.gz

https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz

 

2、说明

系统:
CentOS Linux release 7.4.1708

系统已经安装了python3替代了自带的python2

使用应用requests库的账户登录系统

 

3、编译安装

安装依赖库

tar -zxf certifi-2018.10.15.tar.gz 
cd certifi-2018.10.15/
python setup.py install

 

tar -zxf urllib3-1.24.tar.gz 
cd urllib3-1.24/
python setup.py install

 

tar -zxf idna-2.7.tar.gz 
cd idna-2.7/
python setup.py install

 

tar -zxf chardet-3.0.4.tar.gz 
cd chardet-3.0.4/
python setup.py install

 

安装requests库

unzip requests-master.zip
cd requests-master/
python setup.py install

 

查看库

$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
certifi (2018.10.15)
chardet (3.0.4)
idna (2.7)
pip (9.0.1)
psycopg2-binary (2.8.3) requests (2.22.0) setuptools (28.8.0) tornado (6.0.2) urllib3 (1.24)

 

转载于:https://www.cnblogs.com/xiaoxiaozhou/p/11316869.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值