Remote SSH Workspace cannot find Python Interpreter
See original GitHub issueEnvironment data
- VS Code version: 1.56.2
- Extension version (available under the Extensions sidebar): Jupyter v2021.5.745244803, Python v2021.4.765268190 We had to downgrade because we couldn’t get anything to work with the newest version
- OS and version: MacOS Catalina 10.15.7
- Python version (& distribution if applicable, e.g. Anaconda): Local: Python 3.8.5 64-bit, Remote SSH: Python 3.7.3 64-bit
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): Conda in Remote SSH
- Relevant/affected Python packages and their versions: N/A
- Relevant/affected Python-related VS Code extensions and their versions: Pylance v2021.4.2
- Value of the
python.languageServersetting: Pylance
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
We have already switched to pylance
Expected behaviour
Until May 13, 2021, when we use remote SSH on VS code, version v0.65.4, to connect to a workspace on our AWS GPU, can select the Python interpreter that is installed on the GPU. We have 2 Python 3.7.3 64 bit python interpreters available to us provided we remote SSH into a GPU workspace in VS code -

Actual behaviour
As of May 13, 2021, the only python interpreters that I can select when I remote SSH into the GPU are the ones that are installed locally on my computer. These are obviously incorrect as they do not match Anaconda python versions installed on the GPU. We have even tried updating .vscode/settings.json value for python.pythonPath with the exact directory of the python interpreter location, but the remote SSH workspace can no longer see the correct python interpreters. When we try to select, this is what we see -

As a result, we are not able to use any of the Jupyter features inside of the remote SSH workspace, such as the interactive window or the Jupyter notebook. When we attempt to use a Jupyter> command in VS code, we see that the extension is loading indefinitely.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Step 1 - remote ssh into GPU:

Step 2 - go to select python interpreter:

Step 3 - cannot see the correct python interpreters installed on GPU

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'pythonFindInterpretercf'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
Error 2021-05-20 17:43:40: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file 'vscode-remote://ssh-remote+gpu/home/jmcdonald/.config/Code/User/settings.json' (Error: Unable to resolve non-existing file 'vscode-remote://ssh-remote+gpu/home/jmcdonald/.config/Code/User/settings.json')
at _handleError (/home/jmcdonald/.vscode-server/bin/054a9295330880ed74ceaedda236253b4f39a335/out/vs/server/remoteExtensionHostProcess.js:87:156171)
at async y.readText (/home/jmcdonald/.vscode-server/extensions/ms-python.python-2021.4.765268190/out/client/extension.js:9:339523)
at async p.doesFileNeedToBeFixed (/home/jmcdonald/.vscode-server/extensions/ms-python.python-2021.4.765268190/out/client/extension.js:59:577126)
at async /home/jmcdonald/.vscode-server/extensions/ms-python.python-2021.4.765268190/out/client/extension.js:59:576253
at async Promise.all (index 0)
at async p.getFilesToBeFixed (/home/jmcdonald/.vscode-server/extensions/ms-python.python-2021.4.765268190/out/client/extension.js:59:576199)
at async p.updateTestSettings (/home/jmcdonald/.vscode-server/extensions/ms-python.python-2021.4.765268190/out/client/extension.js:59:575826)] {
code: 'FileNotFound'
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8

Top Related StackOverflow Question
@kimadeline thanks again for all your help here. I have had pretty stable performance with vs code for the last 5 days. I also had other members of my team using the product and it is working for them as well. I think this can be closed. Thanks!
@kimadeline,
Thank you for letting me know. The good news is that as of this evening, I am no longer having this issue. I am now able to select the correct interpreter and use the features of Jupyter as I had been using before. I did update to the latest version of the Python extension to be able to resolve the issue.
If you do not mind, would you be able to keep this ticket open until Friday, just to make sure that my current VS Code user experience is stable?
Thanks!