fix: Ensure pip is available before installation

This commit is contained in:
Paul Gauthier (aider) 2025-06-20 14:22:31 -07:00 committed by Paul Gauthier
parent a2d345fe3d
commit f16110717b

View file

@ -211,6 +211,13 @@ def run_install(cmd):
print() print()
print("Installing:", printable_shell_command(cmd)) print("Installing:", printable_shell_command(cmd))
# First ensure pip is available
ensurepip_cmd = [sys.executable, "-m", "ensurepip", "--upgrade"]
try:
subprocess.run(ensurepip_cmd, capture_output=True, check=False)
except Exception:
pass # Continue even if ensurepip fails
try: try:
output = [] output = []
process = subprocess.Popen( process = subprocess.Popen(