question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python: Interpreter and virtual environments not recognized on remote machine

See original GitHub issue

Hi, I’m using vs code via remote-SSH on a HPC cluster. Python3 is not available per default, but loaded via module load python3. Activating virtual environments also works, with source /path/to/venv/bin/activate as usual.

I cannot get VS code to recognize both python3 and venvs in this setup. image It only recognizes the default python2 binaries, /appl/python/3.6.2/bin/python3 is not accepted. image I am stuck on “Select Python Interpreter”. The same also applies for virtual environments at any location, choosing any venv/bin/python does not work, same issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
karthiknadigcommented, Aug 7, 2020

I think remote VSCode instance starts before you do module load python3, so it does not get the PATH changes. See here https://github.com/microsoft/vscode-remote-release/issues/2982. Please reply to that issue with your scenario. This is something that should be handled by the VSCode remote SSH extension.

0reactions
abhijeetdhakanecommented, Aug 30, 2021

Have anybody figured out?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code does not detect Virtual Environments
In VSCode open your command palette — Ctrl+Shift+P by default. Look for Python: Select Interpreter. In Select Interpreter choose Enter ...
Read more >
How to set a remote virtualenv as the python interpreter?
I was able to successfully configure my remote virtual environment, however the remote virtual environment does not source the '$WORKON_HOME/bin ...
Read more >
Using Python environments in VS Code
Select and activate an environment​​ To select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P). Note: ...
Read more >
Python Virtual Environments: A Primer
To do this, you'll provide the full path to its Python interpreter when executing a command. However, most commonly, you'll want to activate...
Read more >
Manage Python environments and interpreters - Visual Studio ...
For example, you might have installed Visual Studio 2017 or later but cleared all the interpreter options in the installer options for the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found