赞
踩
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
apt update
apt install python3.10
先查看系统已存在的所有python版本
ls -l /usr/bin/python*
将 /usr/bin/python3.8 安装为 /usr/bin/python3 的备选版本,优先级为1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
将 /usr/bin/python3.10 安装为 /usr/bin/python3 的备选版本,优先级为2
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
提示信息中回车即可
update-alternatives --config python3
apt install python3.10-distutils
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
在Python3中为当前用户安装pip
python3 get-pip.py --user
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。