According to the documentation on Github, the python.pythonPath
setting is indeed not used anymore.
Instead, a new settings with the name python.defaultInterpreterPath
has been introduced.
Note, however, that this setting is not exactly the same. The way it is processed by Visual Studio Code is changed as well. See the documentation linked above, or the Python settings reference:
python.defaultInterpreterPath
:
Path to the default Python interpreter to be used by the Python extension on the first time it loads for a workspace, or the path to a folder containing the Python interpreter.
Can use variables like ${workspaceFolder}
and ${workspaceFolder}/.venv
.
Using a path to a folder allows anyone working with a project to create an environment in the .venv
folder as appropriate to their operating system, rather than having to specify an exact platform-dependent path. The settings.json
file can then be included in a source code repository.
Note: Changes to this setting made after an interpreter has been selected for a workspace will not be applied or considered by the Python extension. The Python extension doesn't automatically add or change this setting.