python.pythonPath setting is deprecated. What is an alternative way to retrieve currently selected Python path? Any VSCode environment variables? I want to specify python path in task.json without explicit full path.
python.pythonPath setting is deprecated. What is an alternative way to retrieve currently selected Python path? Any VSCode environment variables? I want to specify python path in task.json without explicit full path.
For the Current python path Need to select an interpreter and the currently used one is shown as a relative path in the box.
In tasks have args called options so you can define env and PYTHONPATH there
You can more details about tasks this documents Tasks in Visual Studio Code
You can open VS Code command selector with ctrl + shift + p and type "Python: Select Interpreter" to open a dropdown menu of all available interpreters. Doing this should create the appropriate entry to settings.json (which was python.pythonPath for me with version Python plugin version v2021.8.1159798656)
You can also change the interpreter from the bottom toolbar.