improved: better installation guide

- change `pip` to `{sys.executable} -m pip`
modified: To prevent the guide message from being obscured by a complex error message, apply `exit` instead of `raise`.
This commit is contained in:
Dr.Lt.Data 2025-03-03 16:43:06 +09:00
parent 6752a826f6
commit 951275c846

View File

@ -3,6 +3,7 @@ import argparse
import logging
import os
import re
import sys
import tempfile
import zipfile
import importlib
@ -21,8 +22,8 @@ try:
import comfyui_frontend_package
except ImportError as e:
# TODO: Remove the check after roll out of 0.3.16
logging.error("\n\n********** ERROR ***********\n\ncomfyui-frontend-package is not installed. Please install the updated requirements.txt file by running:\npip install -r requirements.txt\n\nThis error is happening because the ComfyUI frontend is no longer shipped as part of the main repo but as a pip package instead.\n********** ERROR **********\n")
raise e
logging.error(f"\n\n********** ERROR ***********\n\ncomfyui-frontend-package is not installed. Please install the updated requirements.txt file by running:\n{sys.executable} -m pip install -r requirements.txt\n\nThis error is happening because the ComfyUI frontend is no longer shipped as part of the main repo but as a pip package instead.\n********** ERROR **********\n")
exit(-1)
REQUEST_TIMEOUT = 10 # seconds