Activating Anaconda Environment in VsCode

后端 未结 10 1043
囚心锁ツ
囚心锁ツ 2020-11-30 22:32

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?

10条回答
  •  余生分开走
    2020-11-30 22:57

    Simply use

    1. shift + cmd + P
    2. Search Select Interpreter

    1. Select it and it will show you the list of your virtual environment created via conda and other python versions

    1. select the environment and you are ready to go.

    Quoting the 'Select and activate an environment' docs

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

提交回复
热议问题