{"record":{"id":"b3a5e232f297cea4","repo":"BerriAI/litellm","slug":"missing-dependency-e-run-pip-install-litellm","errorCode":null,"errorMessage":"Missing dependency {e}. Run `pip install 'litellm[proxy]'`","messagePattern":"Missing dependency (.+?)\\. Run `pip install 'litellm\\[proxy\\]'`","errorType":"exception","errorClass":"ModuleNotFoundError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/proxy_cli.py","lineNumber":1012,"sourceCode":"\n    args: Final = locals()\n    if local:\n        from proxy_server import (\n            KeyManagementSettings,\n            ProxyConfig,\n            app,\n            save_worker_config,\n        )\n    else:\n        try:\n            from .proxy_server import (\n                KeyManagementSettings,\n                ProxyConfig,\n                app,\n                save_worker_config,\n            )\n        except ModuleNotFoundError as e:\n            raise ModuleNotFoundError(f\"Missing dependency {e}. Run `pip install 'litellm[proxy]'`\")\n        except ImportError as e:\n            if \"litellm[proxy]\" in str(e):\n                # user is missing a proxy dependency, ask them to pip install litellm[proxy]\n                raise e\n            else:\n                # this is just a local/relative import error, user git cloned litellm\n                from proxy_server import (\n                    KeyManagementSettings,\n                    ProxyConfig,\n                    app,\n                    save_worker_config,\n                )\n    if version is True:\n        ProxyInitializationHelpers._echo_litellm_version()\n        return\n    if model and \"ollama\" in model and api_base is None:\n        ProxyInitializationHelpers._run_ollama_serve()\n    if health is True:","sourceCodeStart":994,"sourceCodeEnd":1030,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/proxy_cli.py#L994-L1030","documentation":"Import guard when starting the proxy server in non-local mode: importing proxy_server failed with ModuleNotFoundError, meaning optional proxy dependencies are absent from the environment. The missing module is named in the message and the fix is installing the proxy extra.","triggerScenarios":"Thrown at litellm/proxy/proxy_cli.py:1012 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install proxy dependencies: pip install 'litellm[proxy]', then restart."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}