Use the launched python executable for installing new packages

This commit is contained in:
cmdr2
2025-07-25 14:43:26 +05:30
parent 374b411d6c
commit d1c834d19b
2 changed files with 5 additions and 4 deletions

View File

@ -54,7 +54,7 @@ def version(module_name: str) -> str:
def install(module_name: str, module_version: str, index_url=None):
install_cmd = f"python -m pip install --upgrade {module_name}=={module_version}"
install_cmd = f'"{sys.executable}" -m pip install --upgrade {module_name}=={module_version}'
if index_url:
install_cmd += f" --index-url {index_url}"
@ -204,9 +204,9 @@ def update_modules():
def _install(module_name, module_version=None):
if module_version is None:
install_cmd = f"python -m pip install {module_name}"
install_cmd = f'"{sys.executable}" -m pip install {module_name}'
else:
install_cmd = f"python -m pip install --upgrade {module_name}=={module_version}"
install_cmd = f'"{sys.executable}" -m pip install --upgrade {module_name}=={module_version}'
print(">", install_cmd)
os.system(install_cmd)

View File

@ -7,7 +7,8 @@ from sdkit.utils import log
from easydiffusion import app
# future home of scripts/check_modules.py
# was meant to be a rewrite of scripts/check_modules.py
# but probably dead for now
manifest = {
"tensorrt": {