Reputation: 20590
Microsoft recently released remote development support for SSH.
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh
However, in python, if you click "select python interpreter". The interpreter available to be chosen is only for a set of python interpreters in anaconda.
The interpreter available to be chosen are in:
~/anaconda3/*
/usr/bin/python
I have a custom python interpreter in a custom location. My interpreter is in ~/projects/myproject/bin/python
How do we configure a remote python interpreter by giving it a path?
Note: I have configured setting.json
"python.pythonPath": "${workspaceFolder}/bin/python",
But it does not seem to respect it
Upvotes: 1
Views: 5126
Reputation: 2858
managed to make it work with
update vscode
my files:
# settings.json
{
"python.pythonPath": "/custom/bin/python"
}
# launch.json
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"pythonPath": "${config:python.pythonPath}"
},
...
restarted vscode
F1 -> select Interpreter
Upvotes: 1