Merge branch 'main' into pip
This commit is contained in:
commit
ec47b2984d
2 changed files with 9 additions and 7 deletions
|
|
@ -66,8 +66,7 @@ def _pip_install_backend_deps() -> None:
|
|||
except ImportError:
|
||||
print("Upgrading huggingface-hub (is_offline_mode missing) ...")
|
||||
subprocess.check_call(
|
||||
[sys.executable, "-m", "pip", "install", "-q",
|
||||
"huggingface-hub>=1.0"],
|
||||
[sys.executable, "-m", "pip", "install", "-q", "huggingface-hub>=1.0"],
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -376,11 +376,14 @@ def install_python_stack() -> int:
|
|||
# pip may not exist yet (uv-created venvs omit it). Try ensurepip
|
||||
# first, then upgrade. Only fall back to a direct upgrade when pip
|
||||
# is already present.
|
||||
_has_pip = subprocess.run(
|
||||
[sys.executable, "-m", "pip", "--version"],
|
||||
stdout = subprocess.DEVNULL,
|
||||
stderr = subprocess.DEVNULL,
|
||||
).returncode == 0
|
||||
_has_pip = (
|
||||
subprocess.run(
|
||||
[sys.executable, "-m", "pip", "--version"],
|
||||
stdout = subprocess.DEVNULL,
|
||||
stderr = subprocess.DEVNULL,
|
||||
).returncode
|
||||
== 0
|
||||
)
|
||||
|
||||
if not _has_pip:
|
||||
run(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue