【发布时间】:2020-12-23 08:15:09
【问题描述】:
我已经通过以下链接手动安装了 Python3.7:https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/。
我已经在 Ubuntu 中安装了默认的 Python3.4。我无法安装 Python 3.7。 请帮我做这件事。
【问题讨论】:
我已经通过以下链接手动安装了 Python3.7:https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/。
我已经在 Ubuntu 中安装了默认的 Python3.4。我无法安装 Python 3.7。 请帮我做这件事。
【问题讨论】:
为了确定,列出可用的python 版本使用
python3 --version
通过此确认,您可以通过运行以下命令卸载您不想要的版本 (3.7):
sudo apt remove python3.7 #this removes only the python package
要删除不再需要的 python 包和任何其他依赖包,请运行:
sudo apt autoremove python
如果您还想从 Ubuntu 中删除 python 的配置和/或数据文件,请运行:
sudo apt purge python
要删除所有相关的python3.7 配置、数据文件和依赖项,请运行:
sudo apt autoremove --purge python
【讨论】:
python3 --version会得到什么?