From 967fd46134c7f07c8828890b5e7ef37da4227cd2 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Sat, 14 Mar 2026 12:56:44 -0700 Subject: [PATCH] fix(setup_wizard): use sysconfig binary to start proxy, not python -m litellm --- litellm/setup_wizard.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/litellm/setup_wizard.py b/litellm/setup_wizard.py index ca13f3056dd..471d873df40 100644 --- a/litellm/setup_wizard.py +++ b/litellm/setup_wizard.py @@ -11,6 +11,7 @@ import importlib.metadata import os import secrets import sys +import sysconfig import termios import tty from pathlib import Path @@ -482,12 +483,14 @@ def _run_wizard() -> None: print() print(f" {green(_CHECK)} Starting LiteLLM proxy on port {bold(str(port))}…") print() - # exec replaces this process with the proxy server + # exec replaces this process with the proxy server. + # Use the litellm console script (same bin dir as the running Python) + # rather than `python -m litellm` — litellm has no __main__.py. + scripts_dir = sysconfig.get_path("scripts") + litellm_bin = os.path.join(scripts_dir, "litellm") os.execlp( # noqa: S606 - sys.executable, - sys.executable, - "-m", - "litellm", + litellm_bin, + litellm_bin, "--config", str(config_path), "--port",