【问题标题】:Python 3.8 installed on macOS Catolina, default still Python 2.7在 macOS Catalina 上安装 Python 3.8,默认仍然是 Python 2.7
【发布时间】:2020-11-15 00:24:36
【问题描述】:

当我在 Catalina 版本 10 中打开一个 mac 终端并输入 python 时,python 版本 2.7.15 会打开。但是,如果我从终端输入“python3.8”,则会打开 3.8 版。

如果 Python 2.7 从内存中彻底根除,会不会有任何意想不到的后果?即使出于某种原因必须保留 Python 2,我如何更新我的终端,以便在其中执行“python”命令时打开最新版本的 Python?

【问题讨论】:

    标签: python-3.x macos python-2.7 terminal macos-catalina


    【解决方案1】:

    https://dev.to/malwarebo/how-to-set-python3-as-a-default-python-version-on-mac-4jjf

    这应该可以帮助您。 在 Mac 上设置默认 python 版本时同样的问题。

    【讨论】:

    • 谢谢彼得。您建议的链接中的解决方案非常适合我的问题,但在我的特定情况下它不起作用。为了完成每个步骤,我必须更改文件的所有权,但 Python 2 还是出现了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-09
    • 2021-05-03
    • 1970-01-01
    • 2018-09-24
    • 2021-01-16
    • 2017-05-10
    相关资源
    最近更新 更多