2025-03-20 21:22:45.756 [warning] Failed to check if /path/to/last-python-project/.venv/bin/python3.12 is an executable [Error: ENOENT: no such file or directory, lstat '/path/to/last-python-project/.venv/bin/python3.12'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/path/to/last-python-project/.venv/bin/python3.12'
}
2025-03-20 21:22:45.760 [warning] Identifier for virt-virtualenv failed to identify /path/to/last-python-project/.venv/bin/python3.12 [Error: ENOENT: no such file or directory, scandir '/path/to/last-python-project/.venv/bin'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/path/to/last-python-project/.venv/bin'
}
2025-03-20 21:22:45.765 [warning] Failed to check if /path/to/last-python-project/.venv/bin/python3.12 is an executable [Error: ENOENT: no such file or directory, lstat '/path/to/last-python-project/.venv/bin/python3.12'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/path/to/last-python-project/.venv/bin/python3.12'
}
2025-03-20 21:22:45.767 [warning] Identifier for virt-virtualenv failed to identify /path/to/last-python-project/.venv/bin/python3.12 [Error: ENOENT: no such file or directory, scandir '/path/to/last-python-project/.venv/bin'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/path/to/last-python-project/.venv/bin'
}
2025-03-20 21:22:48.696 [warning] Failed to check if /path/to/last-python-project/.venv/bin/python3.12 is an executable [Error: ENOENT: no such file or directory, lstat '/path/to/last-python-project/.venv/bin/python3.12'] {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/path/to/last-python-project/.venv/bin/python3.12'
}
2025-03-20 21:22:48.700 [warning] Identifier for virt-virtualenv failed to identify /path/to/last-python-project/.venv/bin/python3.12 [Error: ENOENT: no such file or directory, scandir '/path/to/last-python-project/.venv/bin'] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/path/to/last-python-project/.venv/bin'
}
Type: Bug
Behaviour
Non-Python REPL and Interactive Windows run the python keybindings for the Enter key (
python.execInREPLEnterandpython.execInInteractiveWindowEnterrespectively). If the last python interpreter is not available anymore, the command would not be run and an error message claiming that “An Invalid Python interpreter is selected” would emerge. Since the current REPL or Interactive Window is not for Python, a Python interpreter should not be necessary.Steps to reproduce:
“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.”
Diagnostic data
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Extension version: 2025.0.0
VS Code version: Code 1.95.1 (65edc4939843c90c34d61f4ce11704f09d3e5cb6, 2024-10-31T05:14:54.222Z)
OS version: Linux x64 5.15.0-134-generic
Modes: