This answer from a Visual Studio Code developer says that it is reasonable to keep a Visual Studio Code project's settings.json file in a project's git repository to enforce code standards across different development environments. One down-side though is that when I select the Python interpreter path at the bottom of the screen (so the linter can find the installed packages), the following entry gets added to the settings.json file:
"python.pythonPath": "/path/to/conda/envs/my-env-name/bin/python",
This path is local to the machine and assumes that conda is being used. I have to avoid adding this setting to the settings.json that I commit to the git repository, which is annoying.
Is there a way to set the Python path locally for a project without writing a setting into the settings.json file?
解决方案
It currently isn't directly supported, but we have a feature request that you can upvote if you would like to see it prioritized.