Skip to content

Python extension issues #2752

@MathieuPortmann

Description

@MathieuPortmann

Bug Report: Python Interpreter Detection Failure in VSCodium

Author: User
Date: March 17, 2026
VSCodium Version: Latest stable release (user to specify exact version)
Python Extension Version: ms-python.python v2026.4.0
Operating System: Windows 11 (64-bit)
Python Version: 3.12.6 (installed at C:\Users\user\AppData\Local\Programs\Python\Python312\)


Problem Description

Symptoms

  • Inability to select a Python interpreter in VSCodium, despite Python being correctly installed (confirmed via python --version in the system terminal).
  • Error message:
    Default interpreter path 'C:\Users\user\AppData\Local\Programs\Python\Python312\python.exe' could not be resolved.
    
  • Failure to create virtual environments via VSCodium’s interface.
  • Extension logs:
    Process error: A system error occurred (spawn c:\Users\user\.vscode-oss\extensions\ms-python.python-2026.4.0-universal\python-env-tools\bin\pet.exe ENOENT)
    Python Environment Tools (PET) failed after 3 restart attempts.
    

Expected Behavior

  • The Python interpreter should be detected automatically or manually via the path C:\Users\user\AppData\Local\Programs\Python\Python312\python.exe.
  • Virtual environment creation should work without errors.

Root Cause

Primary Cause

  • Missing pet.exe file in the extension directory:
    C:\Users\user\.vscode-oss\extensions\ms-python.python-2026.4.0-universal\python-env-tools\bin\
    
    • This file is critical for Python environment detection (it is the Python Environment Tool).
    • The python-env-tools\bin\ directory is completely missing after installing the extension via VSCodium.

Possible Secondary Causes

  • Silent installation failure of the extension in VSCodium (the python-env-tools directory is not created).
  • Permission conflicts on extension files (blocked by antivirus or OneDrive).
  • Behavioral differences between VSCodium and VS Code (the extension works correctly in official VS Code).

Diagnostic Steps

Technical Verifications

  • Python installation:
    Confirmed via python --version (Python 3.12.6).
    Path added to PATH: C:\Users\user\AppData\Local\Programs\Python\Python312\.
  • Extension directory contents:
    List of present files (see Appendix 1).
    Missing: python-env-tools\bin\ directory and pet.exe file.
  • Extension logs:
    Repeated ENOENT errors (file not found) for pet.exe.
    Timeouts during PET restart attempts.
  • Additional tests:
    Complete reinstallation of the extension and VSCodium.
    Running VSCodium as administrator.
    Disabling antivirus and OneDrive.

Tested Solutions and Results

Tested Solution Result
Reinstalling the ms-python.python extension Failed (the python-env-tools directory remained missing).
Manually adding pet.exe (downloaded from GitHub) Success: Python interpreter detected, virtual environments functional.
Running VSCodium as administrator No change.
Disabling antivirus/OneDrive No change.
Using official VS Code Works without issues (the python-env-tools directory is present).

Applied Workaround

**Manual Installation of pet.exe**

  1. Download pet.exe from:
    https://github.com/microsoft/vscode-python-environments/releases
    (file: python-env-tools-win32-x64.zip).
  2. Manually create the directories:
 C:\Users\user\.vscode-oss\extensions\ms-python.python-2026.4.0-universal\python-env-tools\bin\
  1. Copy pet.exe into the bin\ directory.
  2. Restart VSCodium as administrator.

Outcome:

  • The Python interpreter is detected.
  • Virtual environments can be created.

Recommendations for VSCodium Developers

Required Fixes

  • Investigate the installation process of the ms-python.python extension:
    Why is the python-env-tools\bin\ directory not created in VSCodium, while it is in VS Code?
    Compare the binary file download/unpacking mechanisms between the two editors.
  • Add detailed logging:
    Display a clear message if the python-env-tools directory or pet.exe is missing.
    Propose an automatic solution (downloading pet.exe from GitHub).
  • Test compatibility with OneDrive:
    Some users store projects in OneDrive\Documents\..., which may cause permission conflicts.
  • Document differences with VS Code:
    Update VSCodium documentation to mention potential limitations with certain extensions.

Appendices

Appendix 1: Extension Directory Contents

C:\Users\user\.vscode-oss\extensions\ms-python.python-2026.4.0-universal\
├── .eslintplugin\
├── dist\
├── images\
├── languages\
├── out\
├── python_files\
├── resources\
├── schemas\
├── syntaxes\
├── .vsixmanifest
├── cgmanifest.json
├── CHANGELOG.md
├── eslint.config.mjs
├── icon.png
├── LICENSE.txt
├── package.json
├── package.nls.json
├── README.md
├── requirements.txt
├── SECURITY.md
└── ThirdPartyNotices-Repository.txt

Note: The python-env-tools\ directory is missing.


Appendix 2: Error Log Excerpt

2026-03-17 19:35:15.187 [error] [pet] Process error: A system error occurred (spawn c:\Users\user\.vscode-oss\extensions\ms-python.python-2026.4.0-universal\python-env-tools\bin\pet.exe ENOENT)
2026-03-17 19:35:46.198 [warning] [pet] Restarting Python Environment Tools (attempt 2/3, waiting 2000ms)
2026-03-17 19:36:52.209 [error] Python Environment Tools (PET) failed after 3 restart attempts.

Conclusion

The bug is specific to VSCodium and is caused by the absence of the pet.exe file in the ms-python.python extension. Manually installing this file resolves the issue, but a fix on the VSCodium side is necessary to prevent users from having to perform this workaround.

Suggested Priority: Medium to high (this bug completely blocks Python usage in VSCodium for new users).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions