Skip to content

Cannot run or debug python files: An Invalid Python interpreter is selected #23878

@Nika-St

Description

@Nika-St

VS Code Version: 1.91.1
Local OS Version: Windows_NT x64 10.0.22631
Remote OS Version: SUSE Linux Enterprise Server (SLES) , version 15-SP3
I develop on a remote server using the VSCode extension:
Remote Development v0.25.0
Python extension: v2024.10.0
Python Debugger extension: v2024.8.0

I cannot run or debug python files. Keep getting the error:
"An Invalid Python interpreter is selected, please try changing it to enable features such as IntelliSense, linting, and debugging. See output for more details regarding why the interpreter is invalid."

Steps to Reproduce:

  1. export PATH=/python/Python-3.11.9.build/bin:$PATH
  2. create and activate a venv
  3. my settings.json in the .vscode dir in the repo: {"python.defaultInterpreterPath": "/bin/python",}
  4. try to run a python file in the repo using F5 or the 'Run Python File' button
  5. Error: "An Invalid Python interpreter is selected, please try changing it to enable features such as IntelliSense, linting, and debugging. See output for more details regarding why the interpreter is invalid."

After selecting the path to my venv in the UI, the same outcome repeats over and over

  • My venv is fully functional: I can run python files in terminal but not in the UI
  • My VSCode installation and the Remote Development extension work without any problems on other remote machines
  • I have tried reinstalling Python and Python Debugger extensions, which didn't change anything (on other machines they work without problems, same extension versions but different OS versions)
  • I have tried re-creating my venv, with the same outcome

Metadata

Metadata

Assignees

Labels

area-environmentsFeatures relating to handling interpreter environmentsinfo-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions