如何在Ubuntu和WSL上将Python从3.10降级到3.9。

huangapple go评论76阅读模式
英文:

How to downgrade python from 3.10 to 3.9 on Ubuntu, WSL

问题

我需要为一个项目降级Python。无法从Ubuntu的3.10降级到3.9,也无法从Windows子系统(Windows Subsystem for Linux)降级。

英文:

I need to downgrade python for a project. Unable to downgrade from 3.10 to 3.9 on Ubuntu, Windows Subsystem for Linux.

答案1

得分: 11

尝试以下步骤:
我正在使用Ubuntu 22.04

sudo apt-get update

sudo add-apt-repository ppa:deadsnakes/ppa

apt list | grep python3.9

sudo apt install python3.9

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1

sudo update-alternatives --config python3
英文:

Try the following steps
I'm using Ubuntu 22.04

sudo apt-get update

sudo add-apt-repository ppa:deadsnakes/ppa

apt list | grep python3.9

sudo apt install python3.9

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1

sudo update-alternatives --config python3

huangapple
  • 本文由 发表于 2023年2月24日 07:19:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75551280.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定