【问题标题】:How change the python version 2.7.16 on my Visual Studio Code terminal to the newer python version?如何将我的 Visual Studio Code 终端上的 python 版本 2.7.16 更改为较新的 python 版本?
【发布时间】:2021-08-13 06:33:42
【问题描述】:

我最近下载了 VS Code,但是 VS CODE 终端的 python 版本是 2.7.16,但我的 mac 终端上的 python 是 3.8.5。如何在 VS code 终端上将 python 版本更改为最新版本?

【问题讨论】:

    标签: python macos visual-studio-code terminal version


    【解决方案1】:

    在VSCode中切换python环境需要执行Python: Select Interpreter(shortcut:Ctrl+Shift+P)命令。

    你正在使用的python环境显示在VSCode的左下方,你可以直接点击切换环境。

    【讨论】:

      【解决方案2】:

      macOS# 不支持在 macOS 上系统安装 Python。相反,建议通过 Homebrew 进行安装。要在 macOS 上使用 Homebrew 安装 Python,请在终端提示符下使用 brew install python3。

      注意在 macOS 上,确保 VS Code 安装位置包含在 PATH 环境变量中。有关详细信息,请参阅这些设置说明。

      供参考: click here to view official vs code documentation

      【讨论】:

        猜你喜欢
        • 2018-06-16
        • 1970-01-01
        • 1970-01-01
        • 2021-12-17
        • 2016-01-25
        • 1970-01-01
        • 2020-05-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多