{"record":{"id":"bebc3705d3d0b2a9","repo":"astral-sh/uv","slug":"the-interpreter-at-is-externally-managed-inste-bebc37","errorCode":null,"errorMessage":"The interpreter at {} is externally managed. Instead, create a virtual environment with `uv venv`.","messagePattern":"The interpreter at (.+?) is externally managed\\. Instead, create a virtual environment with `uv venv`\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/uv/src/commands/pip/uninstall.rs","lineNumber":88,"sourceCode":"        );\n        environment.with_prefix(prefix)?\n    } else {\n        environment\n    };\n\n    // If the environment is externally managed, abort.\n    if let Some(externally_managed) = environment.interpreter().is_externally_managed() {\n        if break_system_packages {\n            debug!(\"Ignoring externally managed environment due to `--break-system-packages`\");\n        } else {\n            return if let Some(error) = externally_managed.into_error() {\n                Err(anyhow::anyhow!(\n                    \"The interpreter at {} is externally managed, and indicates the following:\\n\\n{}\\n\\nConsider creating a virtual environment with `uv venv`.\",\n                    environment.root().user_display().cyan(),\n                    textwrap::indent(&error, \"  \").green(),\n                ))\n            } else {\n                Err(anyhow::anyhow!(\n                    \"The interpreter at {} is externally managed. Instead, create a virtual environment with `uv venv`.\",\n                    environment.root().user_display().cyan()\n                ))\n            };\n        }\n    }\n\n    let _lock = environment\n        .lock()\n        .await\n        .inspect_err(|err| {\n            warn!(\"Failed to acquire environment lock: {err}\");\n        })\n        .ok();\n\n    // Index the current `site-packages` directory.\n    let site_packages = uv_installer::SitePackages::from_environment(&environment)?;\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv/src/commands/pip/uninstall.rs#L70-L106","documentation":"Error \"The interpreter at {} is externally managed. Instead, create a virtual environment with `uv venv`.\" thrown in astral-sh/uv.","triggerScenarios":"Thrown at crates/uv/src/commands/pip/uninstall.rs:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}