Installation errors are still occurring in version 2.15.7
Package
Forge - Neo(Symlink Cuda 2e71c82 Python 3.13.12) reForge(Symlink Cuda 7307781 Python 3.10.19)
When did the issue occur?
Installing the Package
What GPU / hardware type are you using?
NVIDIA GeForce RTX 4070 SUPER, AMD Ryzen 7 5800X, 64GB DDR4
What happened?
Could not install package.
Console output
Unpacking resources
Unpacking resources
Cloning into 'C:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge - Neo'...
Updating files: 100% (1352/1352), done.
Download Complete
Could not install forge-neo (StabilityMatrix.Core.Exceptions.ProcessException: pip install failed with code 2: 'error: Failed to inspect Python interpreter from provided path at venv\Scripts\python.exe\n Caused by: Querying Python at C:\StabilityMatrix\Packages\Stable Diffusion WebUI Forge - Neo\venv\Scripts\python.exe failed with exit status exit code: 1\n\n[stderr]\nAttributeError: module 'main' has no attribute 'file'\n'
at StabilityMatrix.Core.Python.UvVenvRunner.PipInstall(ProcessArgs args, Action1 outputDataReceived) at StabilityMatrix.Core.Models.Packages.BaseGitPackage.SetupVenvPure(String installedPackagePath, String venvName, Boolean forceRecreate, Action1 onConsoleOutput, Nullable1 pythonVersion) at StabilityMatrix.Core.Models.Packages.ForgeClassic.InstallPackage(String installLocation, InstalledPackage installedPackage, InstallPackageOptions options, IProgress1 progress, Action1 onConsoleOutput, CancellationToken cancellationToken) at StabilityMatrix.Core.Models.PackageModification.InstallPackageStep.ExecuteAsync(IProgress1 progress, CancellationToken cancellationToken)
at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IEnumerable`1 steps))
Unpacking resources
Unpacking resources
Cloning into 'C:\StabilityMatrix\Packages\Stable Diffusion WebUI reForge'...
Updating files: 100% (1699/1699), done.
Download Complete
Could not install reforge (StabilityMatrix.Core.Exceptions.ProcessException: pip install failed with code 2: 'error: Failed to inspect Python interpreter from provided path at venv\Scripts\python.exe\n Caused by: Querying Python at C:\StabilityMatrix\Packages\Stable Diffusion WebUI reForge\venv\Scripts\python.exe failed with exit status exit code: 1\n\n[stderr]\nAttributeError: module 'main' has no attribute 'file'. Did you mean: 'name'?\n'
at StabilityMatrix.Core.Python.UvVenvRunner.PipInstall(ProcessArgs args, Action1 outputDataReceived) at StabilityMatrix.Core.Models.Packages.BaseGitPackage.SetupVenvPure(String installedPackagePath, String venvName, Boolean forceRecreate, Action1 onConsoleOutput, Nullable1 pythonVersion) at StabilityMatrix.Core.Models.Packages.SDWebForge.InstallPackage(String installLocation, InstalledPackage installedPackage, InstallPackageOptions options, IProgress1 progress, Action1 onConsoleOutput, CancellationToken cancellationToken) at StabilityMatrix.Core.Models.PackageModification.InstallPackageStep.ExecuteAsync(IProgress1 progress, CancellationToken cancellationToken)
at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IEnumerable`1 steps))
Version
v2.15.7
What Operating System are you using?
Windows 11 25H2(26200.8117) Jp
Packages: Forge Neo (Python 3.13.12) ComfyUI (Python 3.12.12)
I am not experiencing any issues in my environment.
What GPU/hardware are you using? NVIDIA GeForce RTX 5060 Ti 16GB, Core i5-12400F, 64GB DDR4 RAM
Version: v2.15.7
What operating system are you using? Windows 11
I don't know what happened, but it started after I launched an updated program, and downgrading the version doesn't change anything.
Done extracting
Prerequisite install complete
Cloning into 'L:\programm\3\Data\Packages\AI-Toolkit'...
Updating files: 100% (521/521), done.
Download Complete
Could not install ai-toolkit (StabilityMatrix.Core.Exceptions.ProcessException: pip install failed with code 2: 'error: Failed to inspect Python interpreter from provided path at `venv\Scripts\python.exe`\n Caused by: Querying Python at `L:\programm\3\Data\Packages\AI-Toolkit\venv\Scripts\python.exe` failed with exit status exit code: 1\n\n[stderr]\nAttributeError: module '__main__' has no attribute '__file__'. Did you mean: '__name__'?\n'
at StabilityMatrix.Core.Python.UvVenvRunner.PipInstall(ProcessArgs args, Action`1 outputDataReceived)
at StabilityMatrix.Core.Models.Packages.BaseGitPackage.SetupVenvPure(String installedPackagePath, String venvName, Boolean forceRecreate, Action`1 onConsoleOutput, Nullable`1 pythonVersion)
at StabilityMatrix.Core.Models.Packages.AiToolkit.InstallPackage(String installLocation, InstalledPackage installedPackage, InstallPackageOptions options, IProgress`1 progress, Action`1 onConsoleOutput, CancellationToken cancellationToken)
at StabilityMatrix.Core.Models.PackageModification.InstallPackageStep.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IEnumerable`1 steps))
sitecustomize.py tries to do two things: Rich patch: To make the console colorful and beautiful. TQDM patch: To prevent progress bars (like [###---] 50%) from spawning a million new lines, but to update neatly in the Stability Matrix window. The "module 'main' has no attribute 'file'" error only occurs when the installer checks Python. Why? Because the installer launches Python not as a program (python main.py), but as an empty command (python -c "..."). In this mode, Python physically doesn't have a "startup file," so attempting to use the Rich patch naturally fails.
In my case the problem was caused by the security software(ESET Internet Security). I think, the program-behavior‑monitoring feature in that software interfered with sys.addaudithook inside sitecustomize.py, which in turn disrupted python’s operation—especially interactive mode, module execution (-m), and command‑line execution (-c). By excluding the python.exe that StabilityMatrix launches (the one located in the Assets folder) from monitoring, problems are returned to normal. I would prefer not to exclude it from monitoring, but this was the fix that worked in my case.
The first impact I noticed was the following error that appeared when launching the UI.
[sitecustomize error]: module '__main__' has no attribute '__file__'
[sitecustomize error]: module '__main__' has no attribute '__file__'
[sitecustomize error]: module '__main__' has no attribute '__file__'
I traced its root cause. I discovered that the last‑updated date of the security‑software DLL loaded by python.exe is close to the date when the issue was first noticed.
Regarding the installation failure, I tried it with Forge Neo; it failed too, then I excluded python.exe from behavior monitoring, after which the installation succeeded.
I get the same error when I try to install Comfyui for the first time or update it. Since the issue occurred in StabilityMatrix 2.15.7, I reverted to version 2.15.6 and tried using a different internal drive, but the problem persisted. I followed the instructions in the post above and disabled ESET protection and HIPS, but I'm still getting the same error.
OS:windows 11 25h2 26200.8037 Antivirus:ESET Internet Security
Since I couldn't successfully add python.exe to the exceptions list, I disabled ESET's HIPS, and the startup error was resolved.
After reading your posts, I tried it again. It seems that by excluding \Data\Assets from “Detailed Functionality Test” section (I’m not sure what English term is since I’m using a Japanese interface) at bottom of ESET HIPS settings, it works in my environment as well.
When you are saying behavior monitoring for ESET, do you mean the performance exclusions or the detection exclusions? I'm not sure which exactly is being referred to. I tried adding Python.exe to both and still had the same problems with Neo.
My exclusion list is as follows (I am using the Japanese interface):
ver.3.13.12 corresponds to Forge Neo installed by StabilityMatrix 2.15.7.
ver.3.12.11 corresponds to an older ComfyUI installation and an earlier version of StabilityMatrix, so its version may differ from the current one.
ver.3.10.18 corresponds to an older reForge installation.
"詳細動作検査" might be "Detailed Behavior Inspection"
"除外" might be "Exclude"
"編集" might be "Edit"
("自己防衛" might be "Self-Defense", "ランサムウェア保護" might be "Ransomware Protection")
StabilityMatrix's application‑package installation works roughly like this: it downloads the necessary files, installs the python that matches the required version into the Assets folder if needed, creates a virtual environment using that python, and then installs the packages inside the virtual environment. Because python may not yet exist in an uninstalled state, pre‑adding "python.exe" to a security‑software exclusion list is difficult. If installation fails after python has been installed, of course python will be present. Excluding the parent directory (the Assets folder) is might be a sensible approach during the installation process.
For update the packages, I simply deleted the filesitecustomize.pyfrom the folder venv\Lib\site-packages, and everything was updated.
It seems that if you exclude the Assets folder, you don’t need to specify individual files. I’m not sure if this is the right approach from a security standpoint, though...
It seems that if you exclude the Assets folder, you don’t need to specify individual files. I’m not sure if this is the right approach from a security standpoint, though...<
And then wait and see where this script will go without antivirus control, hahaha
I was at least able to get things running again with excluding the folders from deep inspection, but yeah it is a problem since that can create a backdoor for legit threats. I suppose one work around would be running the entire thing in a VM.
Same error.....
Yes its antivirus Eset. Same error! Thank you!
This issue is stale because it has been open 60 days with no activity. Remove the stale label or comment, else this will be closed in 7 days.
This issue was closed because it has been stale for 7 days with no activity.