Free | No tracking | Every fact with a source|German and English

Error / Installation

Stability Matrix: module '__main__' has no attribute '__file__'

Stability Matrix can’t access Python in the venv folder when installing or starting a package (ComfyUI, Forge, A1111, etc.).

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

  1. 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.
  2. After that, start the package installation or update again.
  3. Workaround for older versions (reported by users, not official): In the package folder, rename the file venv\Lib\site-packages\sitecustomize.py and try again.
  4. 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

Sources

Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.