mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
fix(setup): bootstrap pip with ensurepip when not available in venv before neutts install
This commit is contained in:
parent
b2c66681c4
commit
569b78c1f9
1 changed files with 13 additions and 0 deletions
|
|
@ -828,6 +828,19 @@ def _install_neutts_deps() -> bool:
|
|||
print_info("Installing neutts Python package...")
|
||||
print_info("This will also download the TTS model (~300MB) on first use.")
|
||||
print()
|
||||
|
||||
# Ensure pip is available — some venvs are created without pip (e.g. Ubuntu 25.10)
|
||||
try:
|
||||
import importlib
|
||||
if importlib.util.find_spec("pip") is None:
|
||||
print_info("pip not found in venv — bootstrapping with ensurepip...")
|
||||
subprocess.run([sys.executable, "-m", "ensurepip", "--upgrade"], check=True, timeout=30)
|
||||
print_success("pip bootstrapped successfully")
|
||||
except Exception as e:
|
||||
print_warning(f"Could not bootstrap pip: {e}")
|
||||
print_info("Try: python -m ensurepip --upgrade")
|
||||
return False
|
||||
|
||||
try:
|
||||
subprocess.run(
|
||||
[sys.executable, "-m", "pip", "install", "-U", "neutts[all]", "--quiet"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue