如何使用 update-alternatives 将 /usr/local/bin/python 版本设置为 3.9?

如何使用 update-alternatives 将 /usr/local/bin/python 版本设置为 3.9?

update-alternatives --query python生成:

Name: python
Link: /usr/local/bin/python
Status: auto
Best: /usr/bin/python3.9
Value: /usr/bin/python3.9

Alternative: /usr/bin/python3
Priority: 0

Alternative: /usr/bin/python3.9
Priority: 1

python产生:

Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

我希望我的 /usr/local/bin/python 指向 python3.9,然后我可以将我的 PATH 更新为首选项 /usr/local/bin

相关内容