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

如何提高网站的权重/竞价托管服务多少钱

如何提高网站的权重,竞价托管服务多少钱,wordpress hook列表,阜阳网站建设b8bxwindows安装 下载安装包 登录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

相关文章:

如何安装python

windows安装 下载安装包 登录python官网 https://www.python.org/ 点击downloads 置顶下载的是最新的python版本 如果想下载指定版本往下翻找 安装程序 点击即可下载&#xff0c;然后打开下载的exe程序 勾选添加pythonexec到path&#xff0c;也就是添加到环境变量 使用a…...

java String类 万字详解(通俗易懂)

目录 一、前言 二、介绍和溯源 三、String类常用构造器 1.String() 2.String(byte[] bytes) 3.String(char[] value) 4.String(char[] value, int offset, int count) 5.String(String original) Δ演示 : 四、不同方式创建String类对象的区别 1.直接赋值的方式 2.常规new…...

Hive拉链表

概述 拉链表&#xff1a;维护历史状态以及最新状态数据的表 作用场景 1. 数据量比较大。 2. 表中的部分字段会被更新&#xff0c;比如用户的地址&#xff0c;银行利率&#xff0c;订单的状态等。 3. 需要查看某一个时间点或者时间段的历史快照信息&#xff0c;比如&#xff0c;…...

day1 开发我的第一个MyBatis程序

文章目录开发我的第一个MyBatis程序1. resources目录&#xff1a;2. 开发步骤3. 从 XML 中构建 SqlSessionFactoryMyBatisIntroductionTest4. mybatis中有两个主要的配置文件&#xff1a;5. 关于第一个程序的小细节mybatis-config.xml6. 关于mybatis的事务管理机制。&#xff0…...

【CDP】更改solr 存储路径导致ranger-audit 大量报错问题解决

前言 我们生产上公司是使用的CDP集群&#xff0c;一次管理员通知&#xff0c;Solr 组件的数据存放路径磁盘空间不够。 我们的solr 组件时为 Ranger 服务提供日志审计功能&#xff0c; 在我们更改了磁盘路径&#xff0c;并重启了Solr 组件&#xff0c;然后发现相关组件&#…...

JavaScript基础一、简介

零、文章目录 文章地址 个人博客-CSDN地址&#xff1a;https://blog.csdn.net/liyou123456789个人博客-GiteePages&#xff1a;https://bluecusliyou.gitee.io/techlearn 代码仓库地址 Gitee&#xff1a;https://gitee.com/bluecusliyou/TechLearnGithub&#xff1a;https:…...

Qt音视频开发20-vlc内核动态保存录像文件(不需要重新编译源码)

一、前言 在vlc默认提供的保存文件方式中&#xff0c;通过打开的时候传入指定的参数来保存文件&#xff0c;直到关闭播放生成文件&#xff0c;这种方式简单暴力&#xff0c;但是不适用大部分的场景&#xff0c;大部分时候需要的是提供开始录制和停止录制的功能&#xff0c;也就…...

【深度学习】BERT变体—RoBERTa

RoBERTa是的BERT的常用变体&#xff0c;出自Facebook的RoBERTa: A Robustly Optimized BERT Pretraining Approach。来自Facebook的作者根据BERT训练不足的缺点提出了更有效的预训练方法&#xff0c;并发布了具有更强鲁棒性的BERT&#xff1a;RoBERTa。 RoBERTa通过以下四个方面…...

java面试准备1

JVM、JRE和JDK的关系 JVM:Java Virtual Machine是java虚拟机&#xff0c;Java程序需要运行在虚拟机上&#xff0c;不同的平台有自己的虚拟机&#xff0c;因此java可以实现跨平台使用。 JRE&#xff1a;Java Runtion Envirement包括Java虚拟机和Java程序所需要的核心类库等。 J…...

buffer它到底做了个啥,源码级分析linux内核的文件系统的缓冲区

最近一直在学习linux内核源码&#xff0c;总结一下 https://github.com/xiaozhang8tuo/linux-kernel-0.11 自己整理过的带注释的源码。 为什么要有buffer ​ 高速缓冲区是文件系统访问块设备中数据的必经要道(PS:如果所有程序结果都不落盘&#xff0c;只是int a, a直接在主存…...

【蓝桥杯刷题】盗版Huybery系列之手抓饼赛马

【蓝桥杯刷题】—— 盗版Huybery系列之手抓饼赛马&#x1f60e;&#x1f60e;&#x1f60e; 目录 &#x1f4a1;前言&#x1f31e;&#xff1a; &#x1f49b;盗版Huybery系列之手抓饼赛马题目&#x1f49b; &#x1f4aa; 解题思路的分享&#x1f4aa; &#x1f60a;题…...

【微信小程序-原生开发】实用教程16 - 查看详情(含页面跳转的传参方法--简单传参 vs 复杂传参)

需在实现列表的基础上开发 【微信小程序-原生开发】实用教程15 - 列表的排序、搜索&#xff08;含云数据库常用查询条件的使用方法&#xff0c;t-search 组件的使用&#xff09;_朝阳39的博客-CSDN博客 https://sunshinehu.blog.csdn.net/article/details/129356909 效果预览 …...

论文精读:Ansor: Generating High-Performance Tensor Programs for Deep Learning

文章目录1. Abstract2. Introduction3. Background4. Design Overview5. Program Sampling5.1 Sketch Generation5.2 Random Annotation6. Performance Fine-tuning6.1 Evolutionary Search6.2 Learned Cost Model7. Task Scheduler7.1 Problem Formulation7.2 Optimizing with…...

SpringBoot With IoC,DI, AOP,自动配置

文章目录1 IoC&#xff08;Inverse Of Controller&#xff09;2 DI&#xff08;Dependency Injection&#xff09;3 AOP&#xff08;面向切面编程&#xff09;3.1 什么是AOP&#xff1f;3.2 AOP的作用&#xff1f;3.3 AOP的核心概念3.4 AOP常见通知类型3.5 切入点表达式4 自动配…...

ggplot2的组图拓展包(1):patchwork(上篇)

专注系列化、高质量的R语言教程推文索引 | 联系小编 | 付费合集patchwork是ggplot绘图系统的拓展包&#xff0c;主要功能是将多个ggplot格式的图形组合成一幅大图&#xff0c;即组图。patchwork工具包十分好用&#xff0c;它主要利用几个类似四则运算符号的操作符进行组图&…...

Python 异步: 异步迭代器(15)

动动发财的小手&#xff0c;点个赞吧&#xff01; 迭代是 Python 中的基本操作。我们可以迭代列表、字符串和所有其他结构。 Asyncio 允许我们开发异步迭代器。我们可以通过定义一个实现 aiter() 和 anext() 方法的对象来在 asyncio 程序中创建和使用异步迭代器。 1. 什么是异步…...

HD-G2L-IOT V2.0核心板MPU压力测试

1. 测试对象HD-G2L-IOT基于HD-G2L-CORE V2.0工业级核心板设计&#xff0c;双路千兆网口、双路CAN-bus、2路RS-232、2路RS-485、DSI、LCD、4G/5G、WiFi、CSI摄像头接口等&#xff0c;接口丰富&#xff0c;适用于工业现场应用需求&#xff0c;亦方便用户评估核心板及CPU的性能。H…...

scikit-image:遥感图像geotiff格式转mat格式

scikit-imagescikit-image 是一个专门用于图像处理的 Python 库&#xff0c;它可以与 Scipy 库和其他可能有助于计算的 Python 库一起使用。Github地址&#xff1a;https://github.com/scikit-image/scikit-image Star有5.3k首先pip安装scikit-image包&#xff0c;或者直接使用…...

吉利银河L7、长城哈弗B07、比亚迪宋Plus DM-i,自主品牌决战混动

2月23日&#xff0c;吉利推出全新的中高端新能源产品序列——吉利银河。当日&#xff0c;吉利推出了首款智能电混SUV「银河L7」&#xff0c;新车将在二季度交付。本月10日&#xff0c;长城汽车也计划举办智能新能源干货大会&#xff0c;其「颠覆技术」等宣传直面新一代的新能源…...

附录3:说一说 Ambari 视图编译相关

一、Ambari View Ambari 视图,即 Ambari Views 。其实 Ambari 视图并不是很好用,所以大部分人很自然地就把 Ambari 视图给忽略了,心里会冒出一句:“还有这东西?”。然而作为 Ambari 的一部分,今天还是要讲一下,万一有人追求 Ambari 完整性,要编译并安装汉化他们呢? …...

Arduino双色LED实验记录

接线图片&#xff1a;双色LED实物和布线有区别&#xff1a;代码&#xff1a;int RED_LED 11; //设置红色为11 int GREEN_LED 10; //设置绿色为10 int val 0;//全局变量val void setup() {// put your setup code here, to run once:pinMode(RED_LED,OUTPUT);//引脚配置pinMo…...

flex布局

十分简单灵活&#xff0c;区区几行代码都可以实现各种页面的布局&#xff0c;曾经学习页面布局时候&#xff0c;深受float、display、position这些属性的困扰&#xff0c;但是学习flex布局&#xff0c;只需要学习几个CSS属性&#xff0c;就可以写出简介优雅复杂的页面布局。 F…...

【操作系统原理实验】命令解释器模拟实现

选择一种高级语言如C/C等&#xff0c;编写一类似于DOS、UNIX中的命令行解释程序。 1)设计系统命名行提示符&#xff1b; 2)自定义命令集&#xff08;8-10个&#xff09;&#xff1b; 3)用户输入help命令以查找命令的帮助&#xff1b; 4)列出命令的功能&#xff0c;区分内部命令…...

使用nvm管理node版本

下载nvm版本参考文章&#xff1a;https://blog.csdn.net/langmanboy/article/details/126357952下载安装选择nvm的目录为d:\nvm&#xff0c;nodejs的目录为d:\nodejs&#xff1a;v14.0.0&#xff1a;执行nvm install 14生成的目录v16.0.0&#xff1a;执行nvm install 16生成的目…...

jQuery BootStrap

1、jQuery的使用方式 1、下载jQuery库文件 网址 2、将下载好的js文件放到项目中&#xff0c;并引入到需要的HTML文件中 3、使用jQuery 注意&#xff1a;jQuery库文件的导入必须在自己写的代码之前。就绪函数在页面上可以写n个。 <!DOCTYPE html> <html lang"en…...

Vue2.0开发之——购物车案例-Footer组件封装(50)

一 概述 导入Footer子组件定义fullState计算属性把全选状态传递给Footer子组件实现全选功能 二 导入Footer子组件 2.1 App.vue中导入Footer组件 import Footer from "/components/Footer/Footer.vue";2.2 App.vue中注册Footer子组件 components: {Header,Goods,F…...

HTML基本概述

文章目录网站和网页浏览器的作用HTML标签元素注释乱码问题web系统是以网站形式呈现的&#xff0c;而前端是以网页形式呈现的。 网站和网页 网站&#xff08;web site&#xff09;&#xff1a;互联网上用于展示特定内容的相关网页的集合。也就是说&#xff0c;一个网站包含多个…...

Vue 3.0 响应式 计算和侦听 【Vue3 从零开始】

本节使用单文件组件语法作为代码示例 #计算值 有时我们需要依赖于其他状态的状态——在 Vue 中&#xff0c;这是用组件计算属性处理的&#xff0c;以直接创建计算值&#xff0c;我们可以使用 computed 方法&#xff1a;它接受 getter 函数并为 getter 返回的值返回一个不可变的…...

1.mbedtls移植到STM32

mbedtls学习笔记 1.关于mbedtls2.STM32移植方法2.1STM32cubemx移植2.2手动移植12.3移植总结2.4手动移植22.4.1移植方式22.4.2测试SHA1加密1.关于mbedtls 1.主要提供了的 SSL/TLS 支持(在传输层对网络进行加密),各种加密算法,各种哈希算法,随机数生成以及 X.509(密码学里…...

模块、包和异常

目录1.模块import 导入from...import 导入2. 模块的搜索顺序3. __name__属性的使用4. 包包的使用步骤5. 发布模块6. 安装模块7. 卸载模块8. pip 安装第三方模块9. 异常处理异常捕获异常的传递抛出 raise 异常1.模块 模块是 Python 程序架构的一个核心概念 每一个以扩展名 py …...