Ask questionsDifferent python.defaultInterpreterPath by workspace not being saved
According to https://github.com/microsoft/vscode-python/wiki/AB-Experiments workspace specific settings for the default Python interpreter should be possible via a new python.defaultInterpreterPath user setting.
python.defaultInterpreterPath is shared between multiple workspaces.
user@MacBook-pro project1 % pipenv shell Launching subshell in virtual environment… . /Users/user/.local/share/virtualenvs/project1-Vn51bfDI/bin/activate user@MacBook-Pro project1 % . /Users/user/.local/share/virtualenvs/project1-Vn51bfDI/bin/activate (project1) user@MacBook-Pro project1 % code .
user@MacBook-pro project2 % pipenv shell Launching subshell in virtual environment… . /Users/user/.local/share/virtualenvs/project2-y-K1Kf4d/bin/activate user@MacBook-Pro project2 % . /Users/user/.local/share/virtualenvs/project2-y-K1Kf4d/bin/activate (project2) user@MacBook-Pro project2 % code .
In project 1, set python.defaultInterpreterPath in project1 to /Users/user/.local/share/virtualenvs/stdapplib-Vn51bfDI/bin/python
In project 2, bring up Preferences to see that python.defaultInterpreterPath is already set to the virtualenv path for project1.
Maybe I'm misunderstanding how this is supposed to work, but a being able to reference a different virtualenv interpreter for each project seems to be a requirement based on the need to not lose prior functionality.
Answer questions karrtikr
@jamie-burks I have edited https://github.com/microsoft/vscode-python/wiki/AB-Experiments to reflect the same, hopefully that'll make things clearer for everyone. Closing this issue now.