0

I want to set default python interpreter-path to avoid being asked every time I log into remote-server.

popup window in vscode

I tried the method in this similar answer. My workspace.json now looks like:

{
    "folders": [
        {
            "uri": "vscode-remote://ssh-remote+172.1.1.1/home/user/workspace/folder1"
        },
        {
            "uri": "vscode-remote://ssh-remote+172.1.1.1/home/wzy/workspace/folder2"
        }
    ],
    "remoteAuthority": "ssh-remote+172.1.1.1",
    "settings": {
        "python.defaultInterpreterPath": "/home/user/miniconda3/envs/py38/bin/python",
    }
}

But every time I reconnect to the server, I need to manully select the python-interpreter ( otherwise a base /user/bin/python3 interpreter would be choosen)

2 Answers 2

7

This worked for me!

  1. Install Python Extension on your SSH remote machine(not your local PC!)
  2. Open the action bar (F1) and Search for "Python: Select interpreter". You can set it there.
Sign up to request clarification or add additional context in comments.

Comments

1

Open the action bar (F1) and select "Open Remote Settings". Search for "default python interpreter". You can set it there.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.