链接: https://download.csdn.net/download/weixin_43897842/74910341
[root@localhost tmp]# tar xzvf python3_6_8.tar.gz
python3.6.8/
python3.6.8/bzip2-libs-1.0.6-13.el7.i686.rpm
python3.6.8/e2fsprogs-1.42.9-19.el7.x86_64.rpm
python3.6.8/e2fsprogs-libs-1.42.9-19.el7.x86_64.rpm
python3.6.8/expat-2.1.0-12.el7.i686.rpm
python3.6.8/expat-2.1.0-12.el7.x86_64.rpm
python3.6.8/gdbm-1.10-8.el7.i686.rpm
python3.6.8/glibc-2.17-325.el7_9.i686.rpm
python3.6.8/glibc-2.17-325.el7_9.x86_64.rpm
python3.6.8/glibc-common-2.17-325.el7_9.x86_64.rpm
python3.6.8/glibc-devel-2.17-325.el7_9.x86_64.rpm
python3.6.8/glibc-headers-2.17-325.el7_9.x86_64.rpm
python3.6.8/keyutils-libs-1.5.8-3.el7.i686.rpm
python3.6.8/krb5-libs-1.15.1-51.el7_9.i686.rpm
python3.6.8/krb5-libs-1.15.1-51.el7_9.x86_64.rpm
python3.6.8/krb5-workstation-1.15.1-51.el7_9.x86_64.rpm
python3.6.8/libcom_err-1.42.9-19.el7.i686.rpm
python3.6.8/libcom_err-1.42.9-19.el7.x86_64.rpm
python3.6.8/libffi-3.0.13-19.el7.i686.rpm
python3.6.8/libgcc-4.8.5-44.el7.i686.rpm
python3.6.8/libgcc-4.8.5-44.el7.x86_64.rpm
python3.6.8/libkadm5-1.15.1-51.el7_9.x86_64.rpm
python3.6.8/libselinux-2.5-15.el7.i686.rpm
python3.6.8/libsepol-2.5-10.el7.i686.rpm
python3.6.8/libss-1.42.9-19.el7.x86_64.rpm
python3.6.8/libstdc++-4.8.5-44.el7.i686.rpm
python3.6.8/libstdc++-4.8.5-44.el7.x86_64.rpm
python3.6.8/libtirpc-0.2.4-0.16.el7.i686.rpm
python3.6.8/libverto-0.2.5-4.el7.i686.rpm
python3.6.8/ncurses-libs-5.9-14.20130511.el7_4.i686.rpm
python3.6.8/nspr-4.32.0-1.el7_9.x86_64.rpm
python3.6.8/nss-softokn-freebl-3.67.0-3.el7_9.i686.rpm
python3.6.8/nss-softokn-freebl-3.67.0-3.el7_9.x86_64.rpm
python3.6.8/nss-util-3.67.0-1.el7_9.x86_64.rpm
python3.6.8/openssl-1.0.2k-22.el7_9.x86_64.rpm
python3.6.8/openssl-libs-1.0.2k-22.el7_9.i686.rpm
python3.6.8/openssl-libs-1.0.2k-22.el7_9.x86_64.rpm
python3.6.8/pcre-8.32-17.el7.i686.rpm
python3.6.8/python3-3.6.8-18.el7.i686.rpm
python3.6.8/python3-3.6.8-18.el7.x86_64.rpm
python3.6.8/python3-libs-3.6.8-18.el7.i686.rpm
python3.6.8/python3-libs-3.6.8-18.el7.x86_64.rpm
python3.6.8/python3-pip-9.0.3-8.el7.noarch.rpm
python3.6.8/python3-setuptools-39.2.0-10.el7.noarch.rpm
python3.6.8/readline-6.2-11.el7.i686.rpm
python3.6.8/sqlite-3.7.17-8.el7_7.1.i686.rpm
python3.6.8/xz-libs-5.2.2-1.el7.i686.rpm
python3.6.8/zlib-1.2.7-19.el7_9.i686.rpm
python3.6.8/zlib-1.2.7-19.el7_9.x86_64.rpm
[root@localhost tmp]#
[root@localhost python3.6.8]#
[root@localhost python3.6.8]# ls
bzip2-libs-1.0.6-13.el7.i686.rpm libcom_err-1.42.9-19.el7.x86_64.rpm nss-util-3.67.0-1.el7_9.x86_64.rpm
e2fsprogs-1.42.9-19.el7.x86_64.rpm libffi-3.0.13-19.el7.i686.rpm openssl-1.0.2k-22.el7_9.x86_64.rpm
e2fsprogs-libs-1.42.9-19.el7.x86_64.rpm libgcc-4.8.5-44.el7.i686.rpm openssl-libs-1.0.2k-22.el7_9.i686.rpm
expat-2.1.0-12.el7.i686.rpm libgcc-4.8.5-44.el7.x86_64.rpm openssl-libs-1.0.2k-22.el7_9.x86_64.rpm
expat-2.1.0-12.el7.x86_64.rpm libkadm5-1.15.1-51.el7_9.x86_64.rpm pcre-8.32-17.el7.i686.rpm
gdbm-1.10-8.el7.i686.rpm libselinux-2.5-15.el7.i686.rpm python3-3.6.8-18.el7.i686.rpm
glibc-2.17-325.el7_9.i686.rpm libsepol-2.5-10.el7.i686.rpm python3-3.6.8-18.el7.x86_64.rpm
glibc-2.17-325.el7_9.x86_64.rpm libss-1.42.9-19.el7.x86_64.rpm python3-libs-3.6.8-18.el7.i686.rpm
glibc-common-2.17-325.el7_9.x86_64.rpm libstdc++-4.8.5-44.el7.i686.rpm python3-libs-3.6.8-18.el7.x86_64.rpm
glibc-devel-2.17-325.el7_9.x86_64.rpm libstdc++-4.8.5-44.el7.x86_64.rpm python3-pip-9.0.3-8.el7.noarch.rpm
glibc-headers-2.17-325.el7_9.x86_64.rpm libtirpc-0.2.4-0.16.el7.i686.rpm python3-setuptools-39.2.0-10.el7.noarch.rpm
keyutils-libs-1.5.8-3.el7.i686.rpm libverto-0.2.5-4.el7.i686.rpm readline-6.2-11.el7.i686.rpm
krb5-libs-1.15.1-51.el7_9.i686.rpm ncurses-libs-5.9-14.20130511.el7_4.i686.rpm sqlite-3.7.17-8.el7_7.1.i686.rpm
krb5-libs-1.15.1-51.el7_9.x86_64.rpm nspr-4.32.0-1.el7_9.x86_64.rpm xz-libs-5.2.2-1.el7.i686.rpm
krb5-workstation-1.15.1-51.el7_9.x86_64.rpm nss-softokn-freebl-3.67.0-3.el7_9.i686.rpm zlib-1.2.7-19.el7_9.i686.rpm
libcom_err-1.42.9-19.el7.i686.rpm nss-softokn-freebl-3.67.0-3.el7_9.x86_64.rpm zlib-1.2.7-19.el7_9.x86_64.rpm
[root@localhost python3.6.8]#
[root@localhost python3.6.8]#
[root@localhost python3.6.8]#
[root@localhost python3.6.8]# python
python python2 python2.7
[root@localhost python3.6.8]#
[root@localhost python3]# rpm -Uvh ./*.rpm --nodeps --force
Preparing... ################################# [100%]
Updating / installing...
1:libgcc-4.8.5-44.el7 ################################# [ 1%]
2:glibc-common-2.17-325.el7_9 ################################# [ 3%]
3:nss-softokn-freebl-3.67.0-3.el7_9################################# [ 4%]
4:glibc-2.17-325.el7_9 ################################# [ 6%]
5:nspr-4.32.0-1.el7_9 ################################# [ 7%]
6:nss-util-3.67.0-1.el7_9 ################################# [ 9%]
7:libcom_err-1.42.9-19.el7 ################################# [ 10%]
8:zlib-1.2.7-19.el7_9 ################################# [ 12%]
9:libgcc-4.8.5-44.el7 ################################# [ 13%]
10:libss-1.42.9-19.el7 ################################# [ 15%]
11:e2fsprogs-libs-1.42.9-19.el7 ################################# [ 16%]
12:expat-2.1.0-12.el7 ################################# [ 18%]
13:glibc-headers-2.17-325.el7_9 ################################# [ 19%]
14:glibc-devel-2.17-325.el7_9 ################################# [ 21%]
15:e2fsprogs-1.42.9-19.el7 ################################# [ 22%]
16:libstdc++-4.8.5-44.el7 ################################# [ 24%]
17:nss-softokn-freebl-3.67.0-3.el7_9################################# [ 25%]
18:glibc-2.17-325.el7_9 ################################# [ 26%]
19:libcom_err-1.42.9-19.el7 ################################# [ 28%]
20:keyutils-libs-1.5.8-3.el7 ################################# [ 29%]
21:openssl-libs-1:1.0.2k-22.el7_9 ################################# [ 31%]
22:krb5-libs-1.15.1-51.el7_9 ################################# [ 32%]
23:libstdc++-4.8.5-44.el7 ################################# [ 34%]
24:ncurses-libs-5.9-14.20130511.el7_################################# [ 35%]
25:readline-6.2-11.el7 ################################# [ 37%]
26:zlib-1.2.7-19.el7_9 ################################# [ 38%]
27:libkadm5-1.15.1-51.el7_9 ################################# [ 40%]
28:python3-pip-9.0.3-8.el7 ################################# [ 41%]
29:python3-setuptools-39.2.0-10.el7 ################################# [ 43%]
30:python3-3.6.8-18.el7 ################################# [ 44%]
31:python3-libs-3.6.8-18.el7 ################################# [ 46%]
32:sqlite-3.7.17-8.el7_7.1 ################################# [ 47%]
33:pcre-8.32-17.el7 ################################# [ 49%]
34:bzip2-libs-1.0.6-13.el7 ################################# [ 50%]
35:expat-2.1.0-12.el7 ################################# [ 51%]
36:gdbm-1.10-8.el7 ################################# [ 53%]
37:libffi-3.0.13-19.el7 ################################# [ 54%]
38:libsepol-2.5-10.el7 ################################# [ 56%]
39:libselinux-2.5-15.el7 ################################# [ 57%]
40:libverto-0.2.5-4.el7 ################################# [ 59%]
41:krb5-libs-1.15.1-51.el7_9 ################################# [ 60%]
42:openssl-libs-1:1.0.2k-22.el7_9 ################################# [ 62%]
43:libtirpc-0.2.4-0.16.el7 ################################# [ 63%]
44:xz-libs-5.2.2-1.el7 ################################# [ 65%]
45:krb5-workstation-1.15.1-51.el7_9 ################################# [ 66%]
46:openssl-1:1.0.2k-22.el7_9 ################################# [ 68%]
47:python3-3.6.8-18.el7 ################################# [ 69%]
48:python3-libs-3.6.8-18.el7 ################################# [ 71%]
Cleaning up / removing...
49:krb5-workstation-1.15.1-46.el7 ################################# [ 72%]
50:openssl-1:1.0.2k-19.el7 ################################# [ 74%]
51:libkadm5-1.15.1-46.el7 ################################# [ 75%]
52:openssl-libs-1:1.0.2k-19.el7 ################################# [ 76%]
53:krb5-libs-1.15.1-46.el7 ################################# [ 78%]
54:e2fsprogs-1.42.9-17.el7 ################################# [ 79%]
55:glibc-devel-2.17-307.el7.1 ################################# [ 81%]
56:e2fsprogs-libs-1.42.9-17.el7 ################################# [ 82%]
57:libss-1.42.9-17.el7 ################################# [ 84%]
58:libstdc++-4.8.5-39.el7 ################################# [ 85%]
59:glibc-headers-2.17-307.el7.1 ################################# [ 87%]
60:libcom_err-1.42.9-17.el7 ################################# [ 88%]
61:zlib-1.2.7-18.el7 ################################# [ 90%]
62:expat-2.1.0-11.el7 ################################# [ 91%]
63:glibc-common-2.17-307.el7.1 ################################# [ 93%]
64:nspr-4.21.0-1.el7 ################################# [ 94%]
65:nss-util-3.44.0-4.el7_7 ################################# [ 96%]
66:nss-softokn-freebl-3.44.0-8.el7_7################################# [ 97%]
67:glibc-2.17-307.el7.1 ################################# [ 99%]
68:libgcc-4.8.5-39.el7 ################################# [100%]
[root@localhost python3.6.8]#
[root@localhost python3.6.8]#
[root@localhost python3.6.8]# py
pydoc pydoc3.6 pyinotify python2 python3 python3.6m pyvenv-3.6
pydoc3 pygtk-demo python python2.7 python3.6 pyvenv
[root@localhost python3.6.8]#
[root@localhost python3.6.8]# python3
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>>
>>> print ("hello world")
hello world
>>> exit()
[root@localhost python3.6.8]#
[root@localhost python3.6.8]#
[root@localhost python3.6.8]# pip
pip3 pip-3 pip-3.6 pip3.6
[root@localhost python3.6.8]# pip3
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL
logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-
index.
[root@localhost python3.6.8]#