gpt4 book ai didi

python - 如何更改 Visual Studio Code 中的 Python 版本?

转载 作者:太空狗 更新时间:2023-10-29 21:30:30 28 4
gpt4 key购买 nike

这些是我的设置:

  1. 用户设置

    {
    "atomKeymap.promptV3Features": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.formatOnPaste": true,
    "python.pythonPath": "python3",
    "command": "python3",
    }
  2. 工作区设置

    {
    "python.pythonPath": "${workspaceFolder}/env/bin/python3.6",
    "git.ignoreLimitWarning": true
    }
  3. tasks.json

    {
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "command": "python3",
    "isShellCommand": true,
    "args": ["${file}"],
    "showOutput": "always"
    }

如果我使用调试控制台,版本和路径是正确的: debug

但是无论我做什么,输出总是默认为“python2.7”。 output

我该如何解决这个问题?

最佳答案

在 View 菜单下选择“显示命令托盘”。然后,您可以从命令面板中选择的命令之一是“Python:选择解释器”。选择此选项将允许您选择要使用的 Python 版本。

关于python - 如何更改 Visual Studio Code 中的 Python 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48135624/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com