Activating Anaconda Environment in VsCode

后端 未结 10 1035
囚心锁ツ
囚心锁ツ 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:49

    Unfortunately, this does not work on macOS. Despite the fact that I have export CONDA_DEFAULT_ENV='$HOME/anaconda3/envs/dev' in my .zshrc and "python.pythonPath": "${env.CONDA_DEFAULT_ENV}/bin/python", in my VSCode prefs, the built-in terminal does not use that environment's Python, even if I have started VSCode from the command line where that variable is set.

提交回复
热议问题