Skip to content

"Python Environment Tools (PET) failed" on a Ubuntu powered machine. Can't choose a Python interpreter for the project #1472

@kirisakow

Description

@kirisakow

This relatively new problem would occur on a Ubuntu-powered machine, with logs "Python Environment Tools (PET) failed", even in a project directory that has a .venv/ directory, which doesn't let me choose a Python interpreter for the project:

2026-04-22 15:28:15.432 [warning] [Global] Environment discovery failed after 0.0s.
  Error: process_crash - Python Environment Tools (PET) failed after 3 restart attempts. Please reload the window or check the output channel for details. To debug, run "Python Environments: Run Python Environment Tool (PET) in Terminal" from the Command Palette.
  If environments are not being detected correctly, please report this issue:
  https://github.com/microsoft/vscode-python-environments/issues/new
2026-04-22 15:28:15.435 [warning] [venv] Environment discovery failed after 0.0s.
  Error: process_crash - Python Environment Tools (PET) failed after 3 restart attempts. Please reload the window or check the output channel for details. To debug, run "Python Environments: Run Python Environment Tool (PET) in Terminal" from the Command Palette.
  If environments are not being detected correctly, please report this issue:
  https://github.com/microsoft/vscode-python-environments/issues/new
2026-04-22 15:28:15.437 [warning] [PyEnv] Environment discovery failed after 0.0s.
  Error: process_crash - Python Environment Tools (PET) failed after 3 restart attempts. Please reload the window or check the output channel for details. To debug, run "Python Environments: Run Python Environment Tool (PET) in Terminal" from the Command Palette.
  If environments are not being detected correctly, please report this issue:
  https://github.com/microsoft/vscode-python-environments/issues/new
2026-04-22 15:28:15.438 [warning] [Pipenv] Environment discovery failed after 0.0s.
  Error: process_crash - Python Environment Tools (PET) failed after 3 restart attempts. Please reload the window or check the output channel for details. To debug, run "Python Environments: Run Python Environment Tool (PET) in Terminal" from the Command Palette.
  If environments are not being detected correctly, please report this issue:
  https://github.com/microsoft/vscode-python-environments/issues/new
2026-04-22 15:28:15.440 [warning] [Poetry] Environment discovery failed after 0.0s.
  Error: process_crash - Python Environment Tools (PET) failed after 3 restart attempts. Please reload the window or check the output channel for details. To debug, run "Python Environments: Run Python Environment Tool (PET) in Terminal" from the Command Palette.
  If environments are not being detected correctly, please report this issue:
  https://github.com/microsoft/vscode-python-environments/issues/new

The PET extension happens to be missing, somehow:

  1. Press ctrl shift p
  2. Select Python: Run Python Environment Tool (PET) in terminal
  3. See:
$ /home/username/.vscode-oss/extensions/ms-python.python-2026.4.0-universal/python-env-tools/bin/pet find --verbose
bash: /home/username/.vscode-oss/extensions/ms-python.python-2026.4.0-universal/python-env-tools/bin/pet: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions