【问题标题】:How to switch python version from 3.6.0 to 3.6.7 on Ubuntu 18.04?如何在 Ubuntu 18.04 上将 python 版本从 3.6.0 切换到 3.6.7?
【发布时间】:2019-04-08 23:03:05
【问题描述】:

我目前在 Ubuntu 18.04 上使用 python 版本 3.6.0,并且需要使用 python 版本 >= 3.6.1 才能使用 PySlice_Unpack。

我尝试使用以下命令进行安装:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6

这些命令的输出是:

python3.6 is already the newest version (3.6.7-1~18.04). 

看来我已经安装了 python 3.6.7。但是,当我运行命令 python -V、python3 -V 或 python3.6 -V 时,输出是

Python 3.6.0 :: Continuum Analytics, Inc.

在 /usr/bin/ 我有 python2.7、python3.6、python3.6m、python3 和 python3m 的配置文件。我查看了 python3.6 和 python3 配置文件,它们都有 VERSION="3.6"。如何切换到使用 python 版本 3.6.7 而不是 3.6.0?

【问题讨论】:

    标签: python-3.x ubuntu ubuntu-18.04


    【解决方案1】:

    如果您需要不同版本的 Python(或您正在使用的 Ubuntu 版本中包含的其他版本的 Python 包),那么您可能想尝试使用 VirtualEnv,如此答案中所述:@987654322 @

    【讨论】:

      猜你喜欢
      • 2019-07-30
      • 2023-02-21
      • 2021-07-06
      • 1970-01-01
      • 1970-01-01
      • 2021-06-06
      • 1970-01-01
      • 2021-07-20
      • 2018-10-22
      相关资源
      最近更新 更多