在内网CentOS7操作系统Python2.7.5环境下是不能联网安装各个服务。
下载:
https://files.pythonhosted.org/packages/24/49/7f567b628e14ee004938eec256cffeae7097db9e28576911ae7b84d2ff07/setuptools-41.1.0.post1.tar.gz
使用rz命令上传setuptools-41.1.0.post1.tar.gz至:/usr/local目录
解压安装:
tar -zxvf setuptools-41.1.0.post1.tar.gz
cd setuptools-41.1.0.post1/
python setup.py install
下载:
https://files.pythonhosted.org/packages/aa/1a/62fb0b95b1572c76dbc3cc31124a8b6866cbe9139eb7659ac7349457cf7c/pip-19.2.2.tar.gz
使用rz命令上传pip-19.2.2.tar.gz至:/usr/local目录
解压安装:
tar -zxvf pip-19.2.2.tar.gz
cd pip-19.2.2/
python setup.py install
下载:
https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz
使用rz命令上传requests-2.22.0.tar.gz至:/usr/local目录
解压安装:
tar -zxvf requests-2.22.0.tar.gz
cd requests-2.22.0/
python setup.py install
# 执行python setup.py install 还会去联网下载一些依赖,
# 以下是requests依赖,在requests-2.22.0/requests.egg-info/requests.txt文件中
# 下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/
requests==2.22.0
- certifi [required: >=2017.4.17, installed: 2019.6.16] #CA认证模块
- pip install certifi‑2019.6.16‑py2.py3‑none‑any.whl
- chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4] #通用字符编码检测器模块
- pip install chardet‑3.0.4‑py2.py3‑none‑any.whl
- idna [required: >=2.5,<2.9, installed: 2.8] #国际化域名解析模块
- pip install idna-2.8-py2.py3-none-any.whl
- urllib3 [required: >=1.21.1,<1.26,!=1.25.0,!=1.25.1 installed: 1.25.3] #线程安全HTTP库
- pip install urllib3-1.25.3-py2.py3-none-any.whl
完成以上依赖的安装之后,再执行:python setup.py install 完成requests的安装