当前位置: 首页 > news >正文

阿里云大学 网站建设安徽网站seo

阿里云大学 网站建设,安徽网站seo,wordpress登录破解版,怎么选择合肥网站建设windows安装 下载安装包 登录python官网 https://www.python.org/ 点击downloads 置顶下载的是最新的python版本 如果想下载指定版本往下翻找 安装程序 点击即可下载,然后打开下载的exe程序 勾选添加pythonexec到path,也就是添加到环境变量 使用a…

windows安装

下载安装包

登录python官网

https://www.python.org/

点击downloads

在这里插入图片描述

置顶下载的是最新的python版本

如果想下载指定版本往下翻找

在这里插入图片描述

安装程序

点击即可下载,然后打开下载的exe程序

在这里插入图片描述

勾选添加pythonexec到path,也就是添加到环境变量

使用admin权限进行安装

选择customize installation自定义安装

在这里插入图片描述

默认全选,点击next

自定义安装路径,最好在数据盘的位置创建一个python-版本号的目录,

associate files with python (requires the 'py' launcher)
将文件与python关联(需要'py'启动器)
create shortcuts for installed applications
为已安装的应用程序创建快捷方式
add python to environment variables
将python添加到环境变量
precompile standard library
预编译标准库
download debugging symbols
下载调试符号
download debug binaries (requires vs 2017 or later)
下载调试二进制文件(需要vs 2017或更高版本)

在这里插入图片描述

点击安装等待安装完成

在这里插入图片描述

diable path length limit

关闭路径长度限制

可以关闭

然后就代表安装完成了

安装完后的验证操作

打开cmd,输入python,然后回车

在这里插入图片描述

此处就进入到了python的环境了。也有一个版本号介绍信息

linux安装python(编译安装)

先安装依赖环境程序

[root@iZbp1jf2qla2dgfn1anb4zZ ~]# yum install wget zilb-devel bzip2-devel openssl-devel ncurses-devel splite-devel readline-devel tk-devel gcc make zlib zlib-devel libffi-devel -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
No package zilb-devel available.
No package splite-devel available.
Package gcc-4.8.5-44.el7.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package bzip2-devel.x86_64 0:1.0.6-13.el7 will be installed
---> Package libffi-devel.x86_64 0:3.0.13-19.el7 will be installed
---> Package ncurses-devel.x86_64 0:5.9-14.20130511.el7_4 will be installed
---> Package openssl-devel.x86_64 1:1.0.2k-25.el7_9 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-25.el7_9 for package: 1:openssl-devel-1.0.2k-25.el7_9.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-25.el7_9.x86_64
---> Package readline-devel.x86_64 0:6.2-11.el7 will be installed
---> Package tk-devel.x86_64 1:8.5.13-6.el7 will be installed
--> Processing Dependency: tk = 1:8.5.13-6.el7 for package: 1:tk-devel-8.5.13-6.el7.x86_64
--> Processing Dependency: tcl-devel = 1:8.5.13 for package: 1:tk-devel-8.5.13-6.el7.x86_64
--> Processing Dependency: libXft-devel for package: 1:tk-devel-8.5.13-6.el7.x86_64
--> Processing Dependency: libX11-devel for package: 1:tk-devel-8.5.13-6.el7.x86_64
---> Package zlib.x86_64 0:1.2.7-19.el7_9 will be updated
---> Package zlib.x86_64 0:1.2.7-20.el7_9 will be an update
---> Package zlib-devel.x86_64 0:1.2.7-20.el7_9 will be installed
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.15.1-55.el7_9 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-55.el7_9 for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-55.el7_9 for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-55.el7_9.x86_64
---> Package libX11-devel.x86_64 0:1.6.7-4.el7_9 will be installed
--> Processing Dependency: libX11 = 1.6.7-4.el7_9 for package: libX11-devel-1.6.7-4.el7_9.x86_64
--> Processing Dependency: pkgconfig(xcb) >= 1.11.1 for package: libX11-devel-1.6.7-4.el7_9.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libX11-devel-1.6.7-4.el7_9.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.7-4.el7_9.x86_64
--> Processing Dependency: pkgconfig(kbproto) for package: libX11-devel-1.6.7-4.el7_9.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: libX11-devel-1.6.7-4.el7_9.x86_64
--> Processing Dependency: libX11-xcb.so.1()(64bit) for package: libX11-devel-1.6.7-4.el7_9.x86_64
---> Package libXft-devel.x86_64 0:2.3.2-2.el7 will be installed
--> Processing Dependency: libXft = 2.3.2-2.el7 for package: libXft-devel-2.3.2-2.el7.x86_64
--> Processing Dependency: pkgconfig(xrender) for package: libXft-devel-2.3.2-2.el7.x86_64
--> Processing Dependency: pkgconfig(freetype2) for package: libXft-devel-2.3.2-2.el7.x86_64
--> Processing Dependency: pkgconfig(fontconfig) for package: libXft-devel-2.3.2-2.el7.x86_64
--> Processing Dependency: libXft.so.2()(64bit) for package: libXft-devel-2.3.2-2.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-21.el7_9 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-21.el7_9 for package: 1:openssl-1.0.2k-21.el7_9.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-25.el7_9 will be an update
---> Package tcl-devel.x86_64 1:8.5.13-8.el7 will be installed
--> Processing Dependency: tcl = 1:8.5.13-8.el7 for package: 1:tcl-devel-8.5.13-8.el7.x86_64
---> Package tk.x86_64 1:8.5.13-6.el7 will be installed
--> Running transaction check
---> Package fontconfig-devel.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: fontconfig(x86-64) = 2.13.0-4.3.el7 for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: pkgconfig(uuid) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
---> Package freetype-devel.x86_64 0:2.8-14.el7_9.1 will be installed
--> Processing Dependency: pkgconfig(libpng) for package: freetype-devel-2.8-14.el7_9.1.x86_64
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.15.1-50.el7 will be updated
---> Package krb5-libs.x86_64 0:1.15.1-55.el7_9 will be an update
---> Package libX11.x86_64 0:1.6.7-4.el7_9 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-4.el7_9 for package: libX11-1.6.7-4.el7_9.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-4.el7_9.x86_64
---> Package libXft.x86_64 0:2.3.2-2.el7 will be installed
--> Processing Dependency: libXrender.so.1()(64bit) for package: libXft-2.3.2-2.el7.x86_64
---> Package libXrender-devel.x86_64 0:0.9.10-1.el7 will be installed
---> Package libcom_err-devel.x86_64 0:1.42.9-19.el7 will be installed
---> Package libkadm5.x86_64 0:1.15.1-55.el7_9 will be installed
---> Package libselinux-devel.x86_64 0:2.5-15.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-10 for package: libselinux-devel-2.5-15.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-15.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5-15.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package libxcb-devel.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.13-1.el7.x86_64
---> Package openssl.x86_64 1:1.0.2k-21.el7_9 will be updated
---> Package openssl.x86_64 1:1.0.2k-25.el7_9 will be an update
---> Package tcl.x86_64 1:8.5.13-8.el7 will be installed
---> Package xorg-x11-proto-devel.noarch 0:2018.4-1.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-15.el7_9 will be installed
--> Processing Dependency: expat = 2.1.0-15.el7_9 for package: expat-devel-2.1.0-15.el7_9.x86_64
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
---> Package libX11-common.noarch 0:1.6.7-4.el7_9 will be installed
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
--> Processing Dependency: libXau = 1.0.8-2.1.el7 for package: libXau-devel-1.0.8-2.1.el7.x86_64
--> Processing Dependency: libXau.so.6()(64bit) for package: libXau-devel-1.0.8-2.1.el7.x86_64
---> Package libXrender.x86_64 0:0.9.10-1.el7 will be installed
---> Package libpng-devel.x86_64 2:1.5.13-8.el7 will be installed
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed
---> Package libuuid-devel.x86_64 0:2.23.2-65.el7_9.1 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package expat.x86_64 0:2.1.0-12.el7 will be updated
---> Package expat.x86_64 0:2.1.0-15.el7_9 will be an update
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Finished Dependency ResolutionDependencies Resolved============================================================================================================Package                           Arch             Version                         Repository         Size
============================================================================================================
Installing:bzip2-devel                       x86_64           1.0.6-13.el7                    base              218 klibffi-devel                      x86_64           3.0.13-19.el7                   base               23 kncurses-devel                     x86_64           5.9-14.20130511.el7_4           base              712 kopenssl-devel                     x86_64           1:1.0.2k-25.el7_9               updates           1.5 Mreadline-devel                    x86_64           6.2-11.el7                      base              139 ktk-devel                          x86_64           1:8.5.13-6.el7                  base              488 kzlib-devel                        x86_64           1.2.7-20.el7_9                  updates            50 k
Updating:zlib                              x86_64           1.2.7-20.el7_9                  updates            90 k
Installing for dependencies:dejavu-fonts-common               noarch           2.33-6.el7                      base               64 kdejavu-sans-fonts                 noarch           2.33-6.el7                      base              1.4 Mexpat-devel                       x86_64           2.1.0-15.el7_9                  updates            58 kfontconfig                        x86_64           2.13.0-4.3.el7                  base              254 kfontconfig-devel                  x86_64           2.13.0-4.3.el7                  base              138 kfontpackages-filesystem           noarch           1.44-8.el7                      base              9.9 kfreetype-devel                    x86_64           2.8-14.el7_9.1                  updates           447 kkeyutils-libs-devel               x86_64           1.5.8-3.el7                     base               37 kkrb5-devel                        x86_64           1.15.1-55.el7_9                 updates           273 klibX11                            x86_64           1.6.7-4.el7_9                   updates           607 klibX11-common                     noarch           1.6.7-4.el7_9                   updates           164 klibX11-devel                      x86_64           1.6.7-4.el7_9                   updates           981 klibXau                            x86_64           1.0.8-2.1.el7                   base               29 klibXau-devel                      x86_64           1.0.8-2.1.el7                   base               14 klibXft                            x86_64           2.3.2-2.el7                     base               58 klibXft-devel                      x86_64           2.3.2-2.el7                     base               19 klibXrender                        x86_64           0.9.10-1.el7                    base               26 klibXrender-devel                  x86_64           0.9.10-1.el7                    base               17 klibcom_err-devel                  x86_64           1.42.9-19.el7                   base               32 klibkadm5                          x86_64           1.15.1-55.el7_9                 updates           180 klibpng-devel                      x86_64           2:1.5.13-8.el7                  base              122 klibselinux-devel                  x86_64           2.5-15.el7                      base              187 klibsepol-devel                    x86_64           2.5-10.el7                      base               77 klibuuid-devel                     x86_64           2.23.2-65.el7_9.1               updates            93 klibverto-devel                    x86_64           0.2.5-4.el7                     base               12 klibxcb                            x86_64           1.13-1.el7                      base              214 klibxcb-devel                      x86_64           1.13-1.el7                      base              1.1 Mpcre-devel                        x86_64           8.32-17.el7                     base              480 ktcl                               x86_64           1:8.5.13-8.el7                  base              1.9 Mtcl-devel                         x86_64           1:8.5.13-8.el7                  base              165 ktk                                x86_64           1:8.5.13-6.el7                  base              1.4 Mxorg-x11-proto-devel              noarch           2018.4-1.el7                    base              280 k
Updating for dependencies:expat                             x86_64           2.1.0-15.el7_9                  updates            83 kkrb5-libs                         x86_64           1.15.1-55.el7_9                 updates           810 kopenssl                           x86_64           1:1.0.2k-25.el7_9               updates           494 kopenssl-libs                      x86_64           1:1.0.2k-25.el7_9               updates           1.2 MTransaction Summary
============================================================================================================
Install  7 Packages (+32 Dependent packages)
Upgrade  1 Package  (+ 4 Dependent packages)Total size: 16 M
Total download size: 1.0 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/6): bzip2-devel-1.0.6-13.el7.x86_64.rpm                                           | 218 kB  00:00:00
(2/6): expat-2.1.0-15.el7_9.x86_64.rpm                                               |  83 kB  00:00:00
(3/6): libverto-devel-0.2.5-4.el7.x86_64.rpm                                         |  12 kB  00:00:00
(4/6): zlib-1.2.7-20.el7_9.x86_64.rpm                                                |  90 kB  00:00:00
(5/6): libkadm5-1.15.1-55.el7_9.x86_64.rpm                                           | 180 kB  00:00:00
(6/6): pcre-devel-8.32-17.el7.x86_64.rpm                                             | 480 kB  00:00:00
------------------------------------------------------------------------------------------------------------
Total                                                                       8.9 MB/s | 1.0 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transactionInstalling : xorg-x11-proto-devel-2018.4-1.el7.noarch                                                1/49Updating   : zlib-1.2.7-20.el7_9.x86_64                                                              2/49Updating   : krb5-libs-1.15.1-55.el7_9.x86_64                                                        3/49Updating   : 1:openssl-libs-1.0.2k-25.el7_9.x86_64                                                   4/49Installing : zlib-devel-1.2.7-20.el7_9.x86_64                                                        5/49Installing : libXau-1.0.8-2.1.el7.x86_64                                                             6/49Installing : libxcb-1.13-1.el7.x86_64                                                                7/49Updating   : expat-2.1.0-15.el7_9.x86_64                                                             8/49Installing : fontpackages-filesystem-1.44-8.el7.noarch                                               9/49Installing : 1:tcl-8.5.13-8.el7.x86_64                                                              10/49Installing : 1:tcl-devel-8.5.13-8.el7.x86_64                                                        11/49Installing : dejavu-fonts-common-2.33-6.el7.noarch                                                  12/49Installing : dejavu-sans-fonts-2.33-6.el7.noarch                                                    13/49Installing : fontconfig-2.13.0-4.3.el7.x86_64                                                       14/49Installing : expat-devel-2.1.0-15.el7_9.x86_64                                                      15/49Installing : libXau-devel-1.0.8-2.1.el7.x86_64                                                      16/49Installing : libxcb-devel-1.13-1.el7.x86_64                                                         17/49Installing : 2:libpng-devel-1.5.13-8.el7.x86_64                                                     18/49Installing : freetype-devel-2.8-14.el7_9.1.x86_64                                                   19/49Installing : libkadm5-1.15.1-55.el7_9.x86_64                                                        20/49Installing : libcom_err-devel-1.42.9-19.el7.x86_64                                                  21/49Installing : libX11-common-1.6.7-4.el7_9.noarch                                                     22/49Installing : libX11-1.6.7-4.el7_9.x86_64                                                            23/49Installing : libXrender-0.9.10-1.el7.x86_64                                                         24/49Installing : libXft-2.3.2-2.el7.x86_64                                                              25/49Installing : libX11-devel-1.6.7-4.el7_9.x86_64                                                      26/49Installing : libXrender-devel-0.9.10-1.el7.x86_64                                                   27/49Installing : 1:tk-8.5.13-6.el7.x86_64                                                               28/49Installing : libsepol-devel-2.5-10.el7.x86_64                                                       29/49Installing : ncurses-devel-5.9-14.20130511.el7_4.x86_64                                             30/49Installing : pcre-devel-8.32-17.el7.x86_64                                                          31/49Installing : libselinux-devel-2.5-15.el7.x86_64                                                     32/49Installing : libverto-devel-0.2.5-4.el7.x86_64                                                      33/49Installing : libuuid-devel-2.23.2-65.el7_9.1.x86_64                                                 34/49Installing : fontconfig-devel-2.13.0-4.3.el7.x86_64                                                 35/49Installing : libXft-devel-2.3.2-2.el7.x86_64                                                        36/49Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                 37/49Installing : krb5-devel-1.15.1-55.el7_9.x86_64                                                      38/49Installing : 1:openssl-devel-1.0.2k-25.el7_9.x86_64                                                 39/49Installing : 1:tk-devel-8.5.13-6.el7.x86_64                                                         40/49Installing : readline-devel-6.2-11.el7.x86_64                                                       41/49Updating   : 1:openssl-1.0.2k-25.el7_9.x86_64                                                       42/49Installing : bzip2-devel-1.0.6-13.el7.x86_64                                                        43/49Installing : libffi-devel-3.0.13-19.el7.x86_64                                                      44/49Cleanup    : 1:openssl-1.0.2k-21.el7_9.x86_64                                                       45/49Cleanup    : krb5-libs-1.15.1-50.el7.x86_64                                                         46/49Cleanup    : 1:openssl-libs-1.0.2k-21.el7_9.x86_64                                                  47/49Cleanup    : zlib-1.2.7-19.el7_9.x86_64                                                             48/49Cleanup    : expat-2.1.0-12.el7.x86_64                                                              49/49Verifying  : libXft-devel-2.3.2-2.el7.x86_64                                                         1/49Verifying  : dejavu-sans-fonts-2.33-6.el7.noarch                                                     2/49Verifying  : 1:tcl-8.5.13-8.el7.x86_64                                                               3/49Verifying  : libselinux-devel-2.5-15.el7.x86_64                                                      4/49Verifying  : fontconfig-2.13.0-4.3.el7.x86_64                                                        5/49Verifying  : libXrender-0.9.10-1.el7.x86_64                                                          6/49Verifying  : expat-devel-2.1.0-15.el7_9.x86_64                                                       7/49Verifying  : krb5-devel-1.15.1-55.el7_9.x86_64                                                       8/49Verifying  : xorg-x11-proto-devel-2018.4-1.el7.noarch                                                9/49Verifying  : libffi-devel-3.0.13-19.el7.x86_64                                                      10/49Verifying  : 2:libpng-devel-1.5.13-8.el7.x86_64                                                     11/49Verifying  : fontpackages-filesystem-1.44-8.el7.noarch                                              12/49Verifying  : keyutils-libs-devel-1.5.8-3.el7.x86_64                                                 13/49Verifying  : bzip2-devel-1.0.6-13.el7.x86_64                                                        14/49Verifying  : fontconfig-devel-2.13.0-4.3.el7.x86_64                                                 15/49Verifying  : libuuid-devel-2.23.2-65.el7_9.1.x86_64                                                 16/49Verifying  : libverto-devel-0.2.5-4.el7.x86_64                                                      17/49Verifying  : pcre-devel-8.32-17.el7.x86_64                                                          18/49Verifying  : ncurses-devel-5.9-14.20130511.el7_4.x86_64                                             19/49Verifying  : dejavu-fonts-common-2.33-6.el7.noarch                                                  20/49Verifying  : libX11-devel-1.6.7-4.el7_9.x86_64                                                      21/49Verifying  : 1:tk-devel-8.5.13-6.el7.x86_64                                                         22/49Verifying  : libxcb-1.13-1.el7.x86_64                                                               23/49Verifying  : 1:tk-8.5.13-6.el7.x86_64                                                               24/49Verifying  : libXrender-devel-0.9.10-1.el7.x86_64                                                   25/49Verifying  : expat-2.1.0-15.el7_9.x86_64                                                            26/49Verifying  : 1:openssl-libs-1.0.2k-25.el7_9.x86_64                                                  27/49Verifying  : krb5-libs-1.15.1-55.el7_9.x86_64                                                       28/49Verifying  : libXft-2.3.2-2.el7.x86_64                                                              29/49Verifying  : zlib-1.2.7-20.el7_9.x86_64                                                             30/49Verifying  : 1:openssl-1.0.2k-25.el7_9.x86_64                                                       31/49Verifying  : zlib-devel-1.2.7-20.el7_9.x86_64                                                       32/49Verifying  : freetype-devel-2.8-14.el7_9.1.x86_64                                                   33/49Verifying  : libsepol-devel-2.5-10.el7.x86_64                                                       34/49Verifying  : readline-devel-6.2-11.el7.x86_64                                                       35/49Verifying  : libxcb-devel-1.13-1.el7.x86_64                                                         36/49Verifying  : 1:openssl-devel-1.0.2k-25.el7_9.x86_64                                                 37/49Verifying  : libkadm5-1.15.1-55.el7_9.x86_64                                                        38/49Verifying  : libX11-1.6.7-4.el7_9.x86_64                                                            39/49Verifying  : libX11-common-1.6.7-4.el7_9.noarch                                                     40/49Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                            41/49Verifying  : libcom_err-devel-1.42.9-19.el7.x86_64                                                  42/49Verifying  : 1:tcl-devel-8.5.13-8.el7.x86_64                                                        43/49Verifying  : libXau-devel-1.0.8-2.1.el7.x86_64                                                      44/49Verifying  : zlib-1.2.7-19.el7_9.x86_64                                                             45/49Verifying  : expat-2.1.0-12.el7.x86_64                                                              46/49Verifying  : 1:openssl-1.0.2k-21.el7_9.x86_64                                                       47/49Verifying  : 1:openssl-libs-1.0.2k-21.el7_9.x86_64                                                  48/49Verifying  : krb5-libs-1.15.1-50.el7.x86_64                                                         49/49Installed:bzip2-devel.x86_64 0:1.0.6-13.el7                       libffi-devel.x86_64 0:3.0.13-19.el7ncurses-devel.x86_64 0:5.9-14.20130511.el7_4            openssl-devel.x86_64 1:1.0.2k-25.el7_9readline-devel.x86_64 0:6.2-11.el7                      tk-devel.x86_64 1:8.5.13-6.el7zlib-devel.x86_64 0:1.2.7-20.el7_9Dependency Installed:dejavu-fonts-common.noarch 0:2.33-6.el7             dejavu-sans-fonts.noarch 0:2.33-6.el7expat-devel.x86_64 0:2.1.0-15.el7_9                 fontconfig.x86_64 0:2.13.0-4.3.el7fontconfig-devel.x86_64 0:2.13.0-4.3.el7            fontpackages-filesystem.noarch 0:1.44-8.el7freetype-devel.x86_64 0:2.8-14.el7_9.1              keyutils-libs-devel.x86_64 0:1.5.8-3.el7krb5-devel.x86_64 0:1.15.1-55.el7_9                 libX11.x86_64 0:1.6.7-4.el7_9libX11-common.noarch 0:1.6.7-4.el7_9                libX11-devel.x86_64 0:1.6.7-4.el7_9libXau.x86_64 0:1.0.8-2.1.el7                       libXau-devel.x86_64 0:1.0.8-2.1.el7libXft.x86_64 0:2.3.2-2.el7                         libXft-devel.x86_64 0:2.3.2-2.el7libXrender.x86_64 0:0.9.10-1.el7                    libXrender-devel.x86_64 0:0.9.10-1.el7libcom_err-devel.x86_64 0:1.42.9-19.el7             libkadm5.x86_64 0:1.15.1-55.el7_9libpng-devel.x86_64 2:1.5.13-8.el7                  libselinux-devel.x86_64 0:2.5-15.el7libsepol-devel.x86_64 0:2.5-10.el7                  libuuid-devel.x86_64 0:2.23.2-65.el7_9.1libverto-devel.x86_64 0:0.2.5-4.el7                 libxcb.x86_64 0:1.13-1.el7libxcb-devel.x86_64 0:1.13-1.el7                    pcre-devel.x86_64 0:8.32-17.el7tcl.x86_64 1:8.5.13-8.el7                           tcl-devel.x86_64 1:8.5.13-8.el7tk.x86_64 1:8.5.13-6.el7                            xorg-x11-proto-devel.noarch 0:2018.4-1.el7Updated:zlib.x86_64 0:1.2.7-20.el7_9Dependency Updated:expat.x86_64 0:2.1.0-15.el7_9         krb5-libs.x86_64 0:1.15.1-55.el7_9 openssl.x86_64 1:1.0.2k-25.el7_9openssl-libs.x86_64 1:1.0.2k-25.el7_9Complete!
[root@iZbp1jf2qla2dgfn1anb4zZ ~]#

安装程序

官网找到源码包,解压然后配置安装路径

官网下载后,放到服务器上

[root@iZbp1jf2qla2dgfn1anb4zZ ~]# cd /opt/gsy/
[root@iZbp1jf2qla2dgfn1anb4zZ gsy]# ls
Python-3.11.2.tgz
[root@iZbp1jf2qla2dgfn1anb4zZ gsy]# tar -xf Python-3.11.2.tgz
[root@iZbp1jf2qla2dgfn1anb4zZ gsy]#
[root@iZbp1jf2qla2dgfn1anb4zZ gsy]# ls
Python-3.11.2  Python-3.11.2.tgz
[root@iZbp1jf2qla2dgfn1anb4zZ gsy]# cd Python-3.11.2
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls
aclocal.m4    configure     Grammar     Lib      Makefile.pre.in  Objects  PCbuild        Python      Tools
config.guess  configure.ac  Include     LICENSE  Misc             Parser   Programs       README.rst
config.sub    Doc           install-sh  Mac      Modules          PC       pyconfig.h.in  setup.py
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#

查看configure配置的时候的help参数

常用的配置一般就是–prefix=PREFIX指定安装目录

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ./configure --help
`configure' configures python 3.11 to adapt to many kinds of systems.Usage: ./configure [OPTION]... [VAR=VALUE]...To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.Defaults for the options are specified in brackets.Configuration:-h, --help              display this help and exit--help=short        display options specific to this package--help=recursive    display the short help of all the included packages-V, --version           display version information and exit-q, --quiet, --silent   do not print `checking ...' messages--cache-file=FILE   cache test results in FILE [disabled]-C, --config-cache      alias for `--cache-file=config.cache'-n, --no-create         do not create output files--srcdir=DIR        find the sources in DIR [configure dir or `..']Installation directories:--prefix=PREFIX         install architecture-independent files in PREFIX[/usr/local]--exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX[PREFIX]By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.For better control, use the options below.Fine tuning of the installation directories:--bindir=DIR            user executables [EPREFIX/bin]--sbindir=DIR           system admin executables [EPREFIX/sbin]--libexecdir=DIR        program executables [EPREFIX/libexec]--sysconfdir=DIR        read-only single-machine data [PREFIX/etc]--sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]--localstatedir=DIR     modifiable single-machine data [PREFIX/var]--runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]--libdir=DIR            object code libraries [EPREFIX/lib]--includedir=DIR        C header files [PREFIX/include]--oldincludedir=DIR     C header files for non-gcc [/usr/include]--datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]--datadir=DIR           read-only architecture-independent data [DATAROOTDIR]--infodir=DIR           info documentation [DATAROOTDIR/info]--localedir=DIR         locale-dependent data [DATAROOTDIR/locale]--mandir=DIR            man documentation [DATAROOTDIR/man]--docdir=DIR            documentation root [DATAROOTDIR/doc/python]--htmldir=DIR           html documentation [DOCDIR]--dvidir=DIR            dvi documentation [DOCDIR]--pdfdir=DIR            pdf documentation [DOCDIR]--psdir=DIR             ps documentation [DOCDIR]System types:--build=BUILD     configure for building on BUILD [guessed]--host=HOST       cross-compile to build programs to run on HOST [BUILD]Optional Features:--disable-option-checking  ignore unrecognized --enable/--with options--disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)--enable-FEATURE[=ARG]  include FEATURE [ARG=yes]--enable-universalsdk[=SDKDIR]create a universal binary build. SDKDIR specifieswhich macOS SDK should be used to perform the build,see Mac/README.rst. (default is no)--enable-framework[=INSTALLDIR]create a Python.framework rather than a traditionalUnix install. optional INSTALLDIR specifies theinstallation path. see Mac/README.rst (default isno)--enable-wasm-dynamic-linkingEnable dynamic linking support for WebAssembly(default is no)--enable-wasm-pthreads  Enable pthread emulation for WebAssembly (default isno)--enable-shared         enable building a shared Python library (default isno)--enable-profiling      enable C-level code profiling with gprof (default isno)--enable-pystats        enable internal statistics gathering (default is no)--enable-optimizations  enable expensive, stable optimizations (PGO, etc.)(default is no)--enable-loadable-sqlite-extensionssupport loadable extensions in the sqlite3 module,see Doc/library/sqlite3.rst (default is no)--enable-ipv6           enable ipv6 (with ipv4) support, seeDoc/library/socket.rst (default is yes if supported)--enable-big-digits[=15|30]use big digits (30 or 15 bits) for Python longs(default is 30)]--disable-test-modules  don't build nor install test modulesOptional Packages:--with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]--without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)--with-build-python=python3.11path to build python binary for cross compiling(default: _bootstrap_python or python3.11)--with-pkg-config=[yes|no|check]use pkg-config to detect build options (default ischeck)--with-universal-archs=ARCHspecify the kind of macOS universal binary thatshould be created. This option is only valid when--enable-universalsdk is set; options are:("universal2", "intel-64", "intel-32", "intel","32-bit", "64-bit", "3-way", or "all") seeMac/README.rst--with-framework-name=FRAMEWORKspecify the name for the python framework on macOSonly valid when --enable-framework is set. seeMac/README.rst (default is 'Python')--with-cxx-main[=COMPILER]compile main() and link Python executable with C++compiler specified in COMPILER (default is $CXX)--with-emscripten-target=[browser|node]Emscripten platform--with-suffix=SUFFIX    set executable suffix to SUFFIX (default is empty,yes is mapped to '.exe')--without-static-libpythondo not build libpythonMAJOR.MINOR.a and do notinstall python.o (default is yes)--with-pydebug          build with Py_DEBUG defined (default is no)--with-trace-refs       enable tracing references for debugging purpose(default is no)--with-assertions       build with C assertions enabled (default is no)--with-lto=[full|thin|no|yes]enable Link-Time-Optimization in any build (defaultis no)--with-address-sanitizerenable AddressSanitizer memory error detector,'asan' (default is no)--with-memory-sanitizer enable MemorySanitizer allocation error detector,'msan' (default is no)--with-undefined-behavior-sanitizerenable UndefinedBehaviorSanitizer undefinedbehaviour detector, 'ubsan' (default is no)--with-hash-algorithm=[fnv|siphash13|siphash24]select hash algorithm for use in Python/pyhash.c(default is SipHash13)--with-tzpath=<list of absolute paths separated by pathsep>Select the default time zone search path for zoneinfo.TZPATH--with-libs='lib1 ...'  link against additional libs (default is no)--with-system-expat     build pyexpat module using an installed expatlibrary, see Doc/library/pyexpat.rst (default is no)--with-system-ffi       build _ctypes module using an installed ffi library,see Doc/library/ctypes.rst (default issystem-dependent)--with-system-libmpdec  build _decimal module using an installed libmpdeclibrary, see Doc/library/decimal.rst (default is no)--with-decimal-contextvarbuild _decimal module using a coroutine-local ratherthan a thread-local context (default is yes)--with-dbmliborder=db1:db2:...override order to check db backends for dbm; a validvalue is a colon separated string with the backendnames `ndbm', `gdbm' and `bdb'.--with-doc-strings      enable documentation strings (default is yes)--with-pymalloc         enable specialized mallocs (default is yes)--with-freelists        enable object freelists (default is yes)--with-c-locale-coercionenable C locale coercion to a UTF-8 based locale(default is yes)--with-valgrind         enable Valgrind support (default is no)--with-dtrace           enable DTrace support (default is no)--with-libm=STRING      override libm math library to STRING (default issystem-dependent)--with-libc=STRING      override libc C library to STRING (default issystem-dependent)--with-platlibdir=DIRNAMEPython library directory name (default is "lib")--with-wheel-pkg-dir=PATHDirectory of wheel packages used by ensurepip(default: none)--with(out)-readline[=editline]use Editline for backend or disable readline module--with-computed-gotos   enable computed gotos in evaluation loop (enabled bydefault on supported compilers)--with-ensurepip[=install|upgrade|no]"install" or "upgrade" using bundled pip (default isupgrade)--with-openssl=DIR      root of the OpenSSL directory--with-openssl-rpath=[DIR|auto|no]Set runtime library directory (rpath) for OpenSSLlibraries, no (default): don't set rpath, auto:auto-detect rpath from --with-openssl andpkg-config, DIR: set an explicit rpath--with-ssl-default-suites=[python|openssl|STRING]override default cipher suites string, python: usePython's preferred selection (default), openssl:leave OpenSSL's defaults untouched, STRING: use acustom string, python and STRING also set TLS 1.2 asminimum TLS version--with-builtin-hashlib-hashes=md5,sha1,sha256,sha512,sha3,blake2builtin hash modules, md5, sha1, sha256, sha512,sha3 (with shake), blake2Some influential environment variables:PKG_CONFIG  path to pkg-config utilityPKG_CONFIG_PATHdirectories to add to pkg-config's search pathPKG_CONFIG_LIBDIRpath overriding pkg-config's built-in search pathMACHDEP     name for machine-dependent library filesCC          C compiler commandCFLAGS      C compiler flagsLDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in anonstandard directory <lib dir>LIBS        libraries to pass to the linker, e.g. -l<library>CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> ifyou have headers in a nonstandard directory <include dir>CPP         C preprocessorHOSTRUNNER  Program to run CPython for the host platformPROFILE_TASKPython args for PGO generation taskLIBUUID_CFLAGSC compiler flags for LIBUUID, overriding pkg-configLIBUUID_LIBSlinker flags for LIBUUID, overriding pkg-configLIBNSL_CFLAGSC compiler flags for LIBNSL, overriding pkg-configLIBNSL_LIBS linker flags for LIBNSL, overriding pkg-configLIBSQLITE3_CFLAGSC compiler flags for LIBSQLITE3, overriding pkg-configLIBSQLITE3_LIBSlinker flags for LIBSQLITE3, overriding pkg-configTCLTK_CFLAGSC compiler flags for TCLTK, overriding pkg-configTCLTK_LIBS  linker flags for TCLTK, overriding pkg-configX11_CFLAGS  C compiler flags for X11, overriding pkg-configX11_LIBS    linker flags for X11, overriding pkg-configGDBM_CFLAGS C compiler flags for gdbmGDBM_LIBS   additional linker flags for gdbmZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-configZLIB_LIBS   linker flags for ZLIB, overriding pkg-configBZIP2_CFLAGSC compiler flags for BZIP2, overriding pkg-configBZIP2_LIBS  linker flags for BZIP2, overriding pkg-configLIBLZMA_CFLAGSC compiler flags for LIBLZMA, overriding pkg-configLIBLZMA_LIBSlinker flags for LIBLZMA, overriding pkg-configLIBCRYPT_CFLAGSC compiler flags for LIBCRYPT, overriding pkg-configLIBCRYPT_LIBSlinker flags for LIBCRYPT, overriding pkg-configLIBB2_CFLAGSC compiler flags for LIBB2, overriding pkg-configLIBB2_LIBS  linker flags for LIBB2, overriding pkg-configUse these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.Report bugs to <https://github.com/python/cpython/issues/>.
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ./configure  --prefix=/usr/local/python-3.11.2
。。。
checking for stdlib extension module xxlimited_35... yes
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Misc/python.pc
config.status: creating Misc/python-embed.pc
config.status: creating Misc/python-config.sh
config.status: creating Modules/Setup.bootstrap
config.status: creating Modules/Setup.stdlib
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
configure: creating Modules/Setup.local
configure: creating Makefile
configure:If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls
aclocal.m4     config.sub    Grammar     LICENSE       Makefile.pre.in  Parser    pyconfig.h     setup.py
config.guess   configure     Include     Mac           Misc             PC        pyconfig.h.in  Tools
config.log     configure.ac  install-sh  Makefile      Modules          PCbuild   Python
config.status  Doc           Lib         Makefile.pre  Objects          Programs  README.rst
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#

然后make && make install

Looking in links: /tmp/tmpgxoxt08n
Processing /tmp/tmpgxoxt08n/setuptools-65.5.0-py3-none-any.whl
Processing /tmp/tmpgxoxt08n/pip-22.3.1-py3-none-any.whl
Installing collected packages: setuptools, pipWARNING: The scripts pip3 and pip3.11 are installed in '/usr/local/python-3.11.2/bin' which is not on PATH.Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.3.1 setuptools-65.5.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls /usr/local/python-3.11.2/
bin  include  lib  share

验证

查看,python3.11就是执行命令程序

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls -slahrt /usr/local/python-3.11.2/bin/
total 24M24M -rwxr-xr-x 1 root root  24M Mar  6 11:28 python3.11
4.0K -rwxr-xr-x 1 root root   99 Mar  6 11:28 pydoc3.11
4.0K -rwxr-xr-x 1 root root  114 Mar  6 11:28 idle3.11
4.0K -rwxr-xr-x 1 root root  116 Mar  6 11:28 2to3-3.11
4.0K -rwxr-xr-x 1 root root 3.0K Mar  6 11:28 python3.11-config
4.0K drwxr-xr-x 6 root root 4.0K Mar  6 11:28 ..0 lrwxrwxrwx 1 root root   10 Mar  6 11:28 python3 -> python3.110 lrwxrwxrwx 1 root root   17 Mar  6 11:28 python3-config -> python3.11-config0 lrwxrwxrwx 1 root root    8 Mar  6 11:28 idle3 -> idle3.110 lrwxrwxrwx 1 root root    9 Mar  6 11:28 pydoc3 -> pydoc3.110 lrwxrwxrwx 1 root root    9 Mar  6 11:28 2to3 -> 2to3-3.11
4.0K -rwxr-xr-x 1 root root  244 Mar  6 11:28 pip3.11
4.0K -rwxr-xr-x 1 root root  244 Mar  6 11:28 pip3
4.0K drwxr-xr-x 2 root root 4.0K Mar  6 11:28 .

linux默认有一个python2.7的版本

可以删掉然后创建一个软连接过去,或者配置全局变量让环境识别到python3.11

临时配置全局变量识别python3

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# python3.11
-bash: python3.11: command not found
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# PATH=$PATH:/usr/local/python-3.11.2/bin/
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/python-3.11.2/bin/
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# python3.11
Python 3.11.2 (main, Mar  6 2023, 11:26:58) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

永久配置的话写在profile里面即可

创建软连接让服务器识别python3

取消临时环境变量,再使用创建软连接的方法测试,不过此方法会让使用python2.7的脚本调用绝对路径

检查现有的软连接

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# which python
/usr/bin/python
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls -alrht /usr/bin/python
lrwxrwxrwx 1 root root 7 Jan 28  2021 /usr/bin/python -> python2
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# which python2
/usr/bin/python2
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls -alrht /usr/bin/python2
lrwxrwxrwx 1 root root 9 Jan 28  2021 /usr/bin/python2 -> python2.7
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# which python2.7
/usr/bin/python2.7
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls -alrht /usr/bin/python2.7
-rwxr-xr-x 1 root root 7.0K Nov 17  2020 /usr/bin/python2.7
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#

删掉然后创建一个软连接过去

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# rm -rf /usr/bin/python
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# pwd
/opt/gsy/Python-3.11.2
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls
aclocal.m4         configure     libpython3.11.a  Modules   pybuilddir.txt    python-gdb.py
_bootstrap_python  configure.ac  LICENSE          Objects   pyconfig.h        README.rst
build              Doc           Mac              Parser    pyconfig.h.in     setup.py
config.guess       Grammar       Makefile         PC        python            Tools
config.log         Include       Makefile.pre     PCbuild   Python
config.status      install-sh    Makefile.pre.in  platform  python-config
config.sub         Lib           Misc             Programs  python-config.py
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ln -s /usr/local/python-3.11.2/bi                                                                           n/py
pydoc3             python3            python3.11-config
pydoc3.11          python3.11         python3-config
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ln -s /usr/local/python-3.11.2/bi                                                                           n/py
pydoc3             python3            python3.11-config
pydoc3.11          python3.11         python3-config
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ln -s /usr/local/python-3.11.2/bi                                                                           n/python3.11 /usr/bin/python
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls -alrht /usr/bin/python
lrwxrwxrwx 1 root root 39 Mar  6 14:47 /usr/bin/python -> /usr/local/python-3.11.2/bin/python3.11
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# ls -alrht /usr/bin/python2
lrwxrwxrwx 1 root root 9 Jan 28  2021 /usr/bin/python2 -> python2.7
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#

检查python版本

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# vim /usr/libexec/urlgrabber-ext-down[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# python
Python 3.11.2 (main, Mar  6 2023, 11:26:58) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# python2
Python 2.7.5 (default, Nov 16 2020, 22:23:17)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# python3.11
Python 3.11.2 (main, Mar  6 2023, 11:26:58) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

更新依赖pthon2的yum

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# vim /usr/libexec/urlgrabber-ext-down
#! /usr/bin/python2      #改成python2
然后保存退出
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# yum listFile "/usr/bin/yum", line 30except KeyboardInterrupt, e:^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#vim /usr/bin/yum
#!/usr/bin/python2  # 改成python2
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# yum list  | head -n 10
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
NetworkManager.x86_64                    1:1.18.8-2.el7_9              @updates
NetworkManager-libnm.x86_64              1:1.18.8-2.el7_9              @updates
NetworkManager-team.x86_64               1:1.18.8-2.el7_9              @updates
NetworkManager-tui.x86_64                1:1.18.8-2.el7_9              @updates
NetworkManager-wifi.x86_64               1:1.18.8-2.el7_9              @updates
acl.x86_64                               2.2.51-15.el7                 @anaconda
aic94xx-firmware.noarch                  30-6.el7                      @anaconda

ltiple exception types must be parenthesized

[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]#vim /usr/bin/yum
#!/usr/bin/python2 # 改成python2
[root@iZbp1jf2qla2dgfn1anb4zZ Python-3.11.2]# yum list | head -n 10
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
NetworkManager.x86_64 1:1.18.8-2.el7_9 @updates
NetworkManager-libnm.x86_64 1:1.18.8-2.el7_9 @updates
NetworkManager-team.x86_64 1:1.18.8-2.el7_9 @updates
NetworkManager-tui.x86_64 1:1.18.8-2.el7_9 @updates
NetworkManager-wifi.x86_64 1:1.18.8-2.el7_9 @updates
acl.x86_64 2.2.51-15.el7 @anaconda
aic94xx-firmware.noarch 30-6.el7 @anaconda

http://www.hrbkazy.com/news/8763.html

相关文章:

  • 百度排名 网站标题网络营销推广方式案例
  • 中集建设集团有限公司网站重庆森林百度云
  • 按颜色分类的网页设计欣赏网站智慧软文
  • 做网站用宋体有版权问题吗百度软件应用中心下载
  • 重庆专业网站排名团队杭州关键词优化平台
  • 拼多多关键词推广aso安卓优化
  • 成都手机网站建设哪seo搜索排名优化
  • 有用cc域名做网站的百度关键词优化快速排名软件
  • 上海外贸网站google建站产品网站推广
  • 温州做网站制作哪家好无锡百度推广代理公司
  • 家具设计图纸三视图合肥seo排名收费
  • 怎么样能够为一个网站做推广抖音指数
  • 自己做的一个网站怎么赚钱色盲测试图免费测试
  • 南京建设交易中心网站app拉新项目
  • 可以赚钱做任务的网站有哪些热点新闻最新消息
  • 做网站价格表口碑营销怎么做
  • 淘宝客网站推广备案信息北京网站搭建哪家好
  • 网站解析 cname网站更换服务器对seo的影响
  • 苏州正规网站制作公司百度搜索风云榜排行榜
  • 网站建设柒首先金手指6最新消息
  • 成都专业网站建设价格低企业网站官网
  • 沭阳各乡镇做网站山东网络推广优化排名
  • 男子和美女做bt网站深圳网站优化平台
  • 设计网站企业网站建设公司百度论坛发帖
  • 邹城网站建设湖南企业seo优化推荐
  • 哪些网站做批发衣服青岛seo外包公司
  • 有哪些网站做美食的图片很精致seo搜索引擎优化是通过优化答案
  • 未满18岁能申请网站备案吗自己做网站难吗
  • 如何建设与维护网站推广运营公司哪家好
  • 深圳福田网站建设郴州seo网络优化