【问题标题】:Uninstalling Python3.7 in Ubuntu在 Ubuntu 中卸载 Python3.7
【发布时间】: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。 请帮我做这件事。

【问题讨论】:

    标签: python-3.x installation


    【解决方案1】:

    为了确定,列出可用的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
    

    【讨论】:

    • sudo apt remove 3.7 显示未安装,因此无法卸载
    • 运行python3 --version会得到什么?
    • 感谢您的关注。对于 python3 --version,它显示 3.7.4,但没有 apt 命令在它上面工作。如果我们根据给定的链接安装,我实际上想要文件夹在哪里?
    猜你喜欢
    • 1970-01-01
    • 2018-02-19
    • 2011-08-23
    • 2014-05-19
    • 1970-01-01
    • 2022-01-13
    • 2018-06-12
    • 1970-01-01
    • 2014-04-27
    相关资源
    最近更新 更多