The message
Failed to inspect Python interpreter from provided path at `venv\Scripts\python.exe` … AttributeError: module '__main__' has no attribute '__file__'. Did you mean: '__name__'?
Affects: Stability Matrix
Why is this happening?
Stability Matrix places a helper file sitecustomize.py in each venv. If this file or its compiled version is damaged, for example by an antivirus program, Python startup fails. This affected several versions up to 2.15.x and was fixed in version 2.16.0.
How to fix it
- Update Stability Matrix to version 2.16.0 or newer (via the update notification in the app or from LykosAI’s GitHub release page). The file then repairs itself.
- After that, start the package installation or update again.
- Workaround for older versions (reported by users, not official): In the package folder, rename the file
venv\Lib\site-packages\sitecustomize.pyand try again. - Check whether your antivirus has quarantined files in the Stability Matrix folder, and restore them if necessary.
Better not: Don’t turn off your antivirus completely; updating Stability Matrix will solve the problem.
Terms for this
Similar errors
- Couldn't clone Stable Diffusion (Stability AI repository no longer exists)
- Path too long: Filename too long / Windows Long Path support
- Windows SmartScreen or Defender blocks an installer or .exe
- A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x – a package does not match the installed NumPy version
- A1111: INCOMPATIBLE PYTHON VERSION / Couldn't install torch
Sources
- https://raw.githubusercontent.com/LykosAI/StabilityMatrix/main/CHANGELOG.md
- https://github.com/LykosAI/StabilityMatrix/issues/1589
- https://github.com/LykosAI/StabilityMatrix/issues/1603
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.