从python3.4.6 升级到python 3.9 pip升级到3.9
# zypper se python
# rpm -qa | grep python
# python --version
# python3 --version
# pip --version
因为通过第1步骤,确认已经安装python的版本是python3.4.6,所以集成了pip,可以通过下述命令来启用pip
# python3 -m ensurepip --default-pip
# zypper addrepo -f https://mirrors.tuna.tsinghua.edu.cn/opensuse/distribution/leap/15.3/repo/oss/ tsinghurepo
# zypper lr
# zypper se python39 # zipper install python39
安装过程中,提示文件冲突,确认是否覆盖,yes
安装完成后,如有如下提示:
There are some running programs that might use files deleted by recent upgrade. You may wish to check and restart some of them. Run ‘zypper ps -s‘ to list these programs.
按照提示查看一下,需要重启的应用。
# python3.9 -V
# python3.9 -m ensurepip --default-pip
# pip3 --version
需要确保网络pypi.tuna.tsinghua.edu.cn主机可以ping通
# pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# rpm -ql python39 # rpm –ql python39-base
SUSE_Enterprise Server 12 SP4_Python安装升级
原文:https://www.cnblogs.com/hyyx/p/14793193.html