python - 在 VsCode 中激活 Anaconda 环境

标签 python visual-studio-code anaconda

我让 Anaconda 在我的系统上工作,而 VsCode 也在工作,但是如何让 VsCode 在运行我的 python 脚本时激活特定环境?

最佳答案

简单地使用

  1. shift + cmd + P
  2. 搜索选择口译员

pyhton : Select Interpreter

  1. 选择它,它将显示通过 conda 和其他 python 版本创建的虚拟环境列表

Activating conda virtual environment

  1. 选择环境,您就可以开始了。

引用“选择并激活环境”docs

Selecting an interpreter from the list adds an entry for python.pythonPath with
the path to the interpreter inside your Workspace Settings.

关于python - 在 VsCode 中激活 Anaconda 环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43351596/

相关文章:

python - 在numpy中将单个元素添加到数组

python - 当外键约束是复合主键的一部分时,依赖规则试图在 SQLAlchemy 中清除主键

python - Python pyreverse 可以为函数生成 UML 图吗?

git - 如何在 Visual Studio Code 并排文件中看到 'git diff'?

c++ - 如何将 g++ 从 MinGW 添加到 PATH

anaconda - 如何解决 Anaconda 中的 "Failed to create process"?

anaconda - 为什么 anaconda 在创建新环境时会再次下载我已有的软件包?

python - 当我尝试通过单击图像按钮打开文件选择器时发生错误

visual-studio-code - Visual Studio Code 中的多行正则表达式搜索

python - 如何使用 Conda 下载 python 包,然后离线安装?