Paperspace环境下将Python从3.9.16切换至3.10失败求助
在Ubuntu 20.04.5 LTS(Paperspace环境)中切换Python版本从3.9.16到3.10失败求助
设备信息
root@nu1mmmnfz5:/notebooks/LoRA# cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS" NAME="Ubuntu" VERSION="20.04.5 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.5 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
root@nu1mmmnfz5:/notebooks/LoRA# which python /usr/local/bin/python
root@nu1mmmnfz5:/notebooks/LoRA# ls /usr/local/bin/ | grep python ipython ipython3 python python3
root@nu1mmmnfz5:/notebooks/LoRA# python -V Python 3.9.16
root@nu1mmmnfz5:/notebooks/LoRA# which python3 /usr/local/bin/python3
root@nu1mmmnfz5:/notebooks/LoRA# which python3.10 /usr/bin/python3.10
系统存在
/usr/local/bin和/usr/bin两个路径,通过apt -y install python3.10安装的Python3.10位于/usr/bin路径下,曾因该安装操作无法顺利完成陷入困境。
已尝试操作
- 执行系统更新与安装命令:
apt update -y apt upgrade -y apt -y install python3.10
- 尝试使用
update-alternatives配置默认Python版本,操作及结果如下:- 执行命令:
update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 - 执行命令:
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 - 执行
update-alternatives --config python时,报错:update-alternatives: error: no alternatives for python - 执行
update-alternatives --config python3时,报错:update-alternatives: error: no alternatives for python3
- 执行命令:
内容的提问来源于stack exchange,提问作者Tdayo
相关产品推荐
相关产品推荐

