【发布时间】:2020-01-02 22:11:19
【问题描述】:
我在 MacOS Mojave 10.14.6 上运行 VSCode 1.36.0。
当我在 VSCode 中使用集成终端并运行 Python 时,它总是从 MacOS 上的/usr/bin/python 运行 Python 2.7,而不是默认的 anaconda Python。如果我在系统终端中做同样的事情,一切都很好。
我查看了这两个相关问题的答案:
Why Is macOS Visual Studio Code Using Wrong Python Interpreter?
How can I change python version in Visual Studio Code?
我没有运行代码运行程序扩展。我已将python.pythonPath 设置更新为指向Anaconda Python,但无论我做什么,集成终端中的which python 都会返回/usr/bin/python。使用 conda activate myenv 选择不同的 conda 环境也无济于事。
以前没有遇到过这个问题。
【问题讨论】:
标签: python visual-studio-code vscode-settings