{"record":{"id":"abc968b7d099c29c","repo":"jdx/mise","slug":"reason-instructions-if-pipx-is-already-installed-verify-it","errorCode":null,"errorMessage":"{reason}.\n\n{instructions}\n\nIf pipx is already installed, verify it with `mise which pipx` and `pipx --version`.","messagePattern":"(.+?)\\.\n\n(.+?)\n\nIf pipx is already installed, verify it with `mise which pipx` and `pipx --version`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/pipx.rs","lineNumber":616,"sourceCode":"            // below, so it cannot pass on evidence the spawn will then reject. On Windows a\n            // `pipx.ps1` or a shebang-only `pipx.pyz` satisfies the plain lookup but cannot\n            // be launched, and it used to reach `pipx install` and die with\n            // \"program not found\" instead of these instructions.\n            if !pipx_available {\n                let pipx_configured = match self.dependency_toolset(&ctx.config).await {\n                    Ok(ts) => ts.versions.keys().any(|ba| ba.short == \"pipx\"),\n                    Err(_) => false,\n                };\n                let reason = if pipx_configured {\n                    \"pipx is configured but its executable was not found or is not runnable\"\n                        .to_string()\n                } else {\n                    format!(\n                        \"pipx is required to install {} but was not found\",\n                        self.ba()\n                    )\n                };\n                bail!(\n                    \"{reason}.\\n\\n{instructions}\\n\\nIf pipx is already installed, verify it with `mise which pipx` and `pipx --version`.\"\n                );\n            }\n        }\n\n        let request = self.tool_name().parse::<PipxRequest>()?;\n\n        if let Some(uv_program) = uv_program {\n            let package_request = request.uvx_request(&tv.version, &options);\n            self.ensure_uv_supports_expose(ctx, &options).await?;\n            self.warn_if_uv_may_not_support_exclude_newer(ctx).await;\n            ctx.pr\n                .set_message(format!(\"uv tool install {package_request}\"));\n            let mut cmd = Self::uvx_cmd(\n                &uv_program,\n                &ctx.config,\n                &[\"tool\", \"install\", &package_request],\n                self,","sourceCodeStart":598,"sourceCodeEnd":634,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/pipx.rs#L598-L634","documentation":"install_version_ bails when pipx is required (uv is unavailable, so the pipx path is used) but the pipx executable could not be found. The message bundles the reason with setup instructions for both uv and pipx, and asks the user to verify the configured executable with mise/pipx commands.","triggerScenarios":"Installing a pipx tool when uv is not spawnable and the pipx dependency check fails because no pipx executable exists (not in toolset, not on PATH).","commonSituations":"Fresh environment without pipx; Python/pipx removed or venv broken; PATH misconfigured in CI; user assumed uv would be used but uvx is disabled.","solutions":["Install uv (`mise use uv@latest`) so uvx handles the install instead of pipx","Or install pipx: `mise use pipx@latest` (or `pipx ensurepath` for an existing pipx)","Verify with `mise which pipx` and `pipx --version`"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if (!(await isInstalled(\"pipx\")) && !(await isInstalled(\"uv\")))\n  throw new Error(\"install pipx (mise use pipx@latest) or uv (mise use uv@latest)\");","typeGuard":null,"tryCatchPattern":"try { await $`mise install pipx:ruff` } catch (e) {\n  if (/pipx is required/.test(e.message)) { await $`mise use pipx@latest`; await $`mise install pipx:ruff`; }\n  else throw e;\n}","preventionTips":["Verify `mise which pipx` and `pipx --version` in environment bootstrap","Prefer installing uv so the pipx fallback path is never needed","Keep pipx on PATH in CI images (or install it via mise)"],"tags":["pipx","missing-dependency","install","path"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}