1 .下载地址 https://www.python.org/ftp/python/
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
2.解压
tar -zxvf Python-3.7.5.tgz
3.创建目录
mkdir /usr/local/python3
4.执行配置文件,编译,编译安装
cd /opt/Python-3.7.5
./configure --prefix=/usr/local/python3
make && make install
5.建立软链接
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3
6.测试一下python3是否可以用
python3
来源:CSDN
作者:Chen不旧
链接:https://blog.csdn.net/qq_32257215/article/details/104069808