首页 > 解决方案 > 如何在vs代码中激活conda环境

问题描述

我使用 miniconda 创建了一个虚拟环境。我正在使用带有 Mask rcnn 的 Visual Studio Code 进行训练,但我无法在 Visual Studio Code 中启动虚拟环境,我收到错误消息。Sevinirim 如果你帮助在此处输入图像描述

标签: python

解决方案


请阅读:https ://py-vscode.readthedocs.io/en/latest/files/venv.html#selecting-switching-between-the-environments-in-vs-code

按 ctrl+shift+P 打开 VS Code 的命令面板。

在搜索框中输入解释器。并选择 Python: Select Interpreter 选项。您应该会看到所有可用(显示 conda 和虚拟环境)python 环境的列表。您还应该在那里看到您最近创建的 myenv 环境。切换并选择您的环境,一切顺利。


推荐阅读