With the latest Python extension for visual studio code, there is a venvPath parameter:
// Path to folder with a list of Virtual Environments (eg ~/.pyenv, ~/Envs, ~/.virtualenvs). "python.venvPath": "",
On Mac OS X, go to " Code > Preferences > Settings and scroll down to" Python Configuration " .
Find "python.venvPath: "", and click on the pencil on the left to open the user settings. Finally, add the path to the storage location of your virtual environments.
If you use virtuanenvwrapper or you put all the virtual environment settings in one folder, this will be for you.
After you have configured "python.venvPath" , restart VSC. Then open the command palette and find "Python: Select Interpreter". At this point, you should see the interpreter associated with the virtual environment that you just added.
ssword May 3 '17 at 5:51 2017-05-03 05:51
source share