一、背景
由于CentOS7原来安装的高版本Python,导致一些第三方库读取数据报错,时间全部浪费在报错处理中,一个报错解决了还没运行几个脚本又有其他报错,浪费脑细胞,蹉跎岁月。
二、Python3.12卸载
| 已安装Python | |
| 版本 | 3.12.1 | 
| 软件下载位置 | /home | 
| 安装位置 | /usr/local/python3 | 
| 相关软链接 | ln -s /usr/local/python3/bin/python3.12 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 | 
1、删除原版本压缩包及解压包(可选)
(base) [root@localhost ~]# cd /home
(base) [root@localhost home]# ll
drwx------  18 centos centos         4096 Mar 29 16:34 Python-3.12.0
-rw-r--r--   1 root   root       27195214 Oct  2  2023 Python-3.12.0.tgz(base) [root@localhost home]# rm -rf Python-3.12.0
(base) [root@localhost home]# rm -rf Python-3.12.0.tgz 
(base) [root@localhost home]#