【问题标题】:How to uninstall and install a specific python version如何卸载和安装特定的 python 版本
【发布时间】:2021-05-01 12:28:21
【问题描述】:

我默认使用 ubuntu 20.04 LTS 我有 3.8.2 作为 python 版本,但是当我发出 sudo apt-get update 时,它会更新到 3.8.5,我需要 3.8.2 作为版本。如何卸载 3.8.5 并安装 3.8.2?

【问题讨论】:

    标签: python-3.x ubuntu pip


    【解决方案1】:

    它可能不会直接回答您的问题,但它是一种替代解决方案。您可以安装类似pyenv 的东西,它简化了处理不同python 版本的过程。安装后,pyenv install 3.8.2 && pyenv global 3.8.2 应该可以解决问题。

    【讨论】:

    • 嗨 @Bogsan 我正在使用 ubuntu 20.04,我安装了两个版本的 python 3.8.5 和 3.8.2。如何使 Python 3.8.2 成为 python 的默认版本 ``` $ python3 -V Python 3.8.5 $ python3.8 -V Python 3.8.2 ```
    • 有多种方法可以做到这一点,想到的一种是echo "alias python=$(which python3.8)" >> ~/.bashrc(如果您使用zsh,则为.zshrc)。
    猜你喜欢
    • 1970-01-01
    • 2017-01-07
    • 2021-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-27
    • 1970-01-01
    • 2014-06-03
    相关资源
    最近更新 更多