You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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版本,操作及结果如下:
    1. 执行命令:update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
    2. 执行命令:update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
    3. 执行update-alternatives --config python时,报错:update-alternatives: error: no alternatives for python
    4. 执行update-alternatives --config python3时,报错:update-alternatives: error: no alternatives for python3

内容的提问来源于stack exchange,提问作者Tdayo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.31 23:45:24