卸载python3:

1、卸载python3
rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps 卸载pyhton3

2、whereis python3 |xargs rm -frv 删除所有残余文件
成功卸载!

3、whereis python 查看现有安装的python

安装:
在这里找版本:https://www.python.org/ftp/

yum install libffi-devel -y

wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz
tar -zxvf Python-3.9.9.tgz
cd Python-3.9.9
./configure --prefix=/usr/local/python3
make
make install
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
ln -n /usr/local/python3/bin/pip /usr/bin/pip3

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐