此篇以 CentOS 7 64bit為範例:
1. 確認 OS 版本
# cat redhat-release
CentOS Linux release 7.5.1804 (Core)
2. 先到相同版本的 OS 上 yum install 看相依套件有哪些
# yum install python36-requests python36
3.若網路環境無法使用yum ,可以看到來源都是 epel,就到 epel 的 repo 網址上去找:
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages
3. wget RPM
# wget http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-requests-2.12.5-3.el7.noarch.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-3.6.8-1.el7.x86_64.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-chardet-2.3.0-6.el7.noarch.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-idna-2.7-2.el7.noarch.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-libs-3.6.8-1.el7.x86_64.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-pysocks-1.6.8-6.el7.noarch.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-six-1.11.0-3.el7.noarch.rpm \
http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-urllib3-1.19.1-5.el7.noarch.rpm
or
wget http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-requests-2.12.5-3.el7.noarch.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-3.6.8-1.el7.x86_64.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-chardet-2.3.0-6.el7.noarch.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-idna-2.7-2.el7.noarch.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-libs-3.6.8-1.el7.x86_64.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-pysocks-1.6.8-6.el7.noarch.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-six-1.11.0-3.el7.noarch.rpm http://mirror01.idc.hinet.net/EPEL/7/x86_64/Packages/p/python36-urllib3-1.19.1-5.el7.noarch.rpm
4. 使用 yum 安裝這些本地端 rpm:
# yum --disablerepo=* install *.rpm