gpt4 book ai didi

python - 如何从 Ubuntu 19.10 卸载 python 3.7?

转载 作者:行者123 更新时间:2023-12-04 14:31:18 27 4
gpt4 key购买 nike

我正在使用 Ubuntu 19.10 ,其中有版本3.7的python .发布后python 3.8 ,我已经安装了,现在我想卸载 python 3.7所以每当我打电话时 python3在我的终端中,它总是会调用 python3.8 ?

最佳答案

您不需要为此卸载旧版本。
你需要更新你的 update-alternatives ,然后你就可以设置你的默认 python 版本。

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.4 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2

然后运行:
sudo update-alternatives --config python
Set python3.6 as default.

或者使用以下命令将python3.6设置为默认值:

须藤更新替代品 --set python/usr/bin/python3.6
这应该做。

关于python - 如何从 Ubuntu 19.10 卸载 python 3.7?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59337891/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com