在VsCode中激活Anaconda环境 [英] Activating Anaconda Environment in VsCode

查看:1254
本文介绍了在VsCode中激活Anaconda环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have Anaconda working on my system and VsCode working, but how do I get VsCode to activate a specific environment when running my python script?

推荐答案

如果Anaconda是您的默认Python安装程序,则仅当您安装

If Anaconda is your default Python install then it just works if you install the Microsoft Python extension.

无论使用Python编辑器还是需要指向特定的安装,以下内容均应起作用:

The following should work regardless of Python editor or if you need to point to a specific install:

在settings.json中,使用类似的内容编辑python.path

In settings.json edit python.path with something like

"python.pythonPath": "C:\\Anaconda3\\envs\\py34\\python.exe"

说明以编辑settings.json

Instructions to edit settings.json

这篇关于在VsCode中激活Anaconda环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆