{
  "id": "python/pip-install-scripts-not-on-path",
  "signature": "WARNING: The script somecli is installed in '/home/user/.local/bin' which is not on PATH.",
  "signature_zh": "警告：脚本 somecli 已安装到 '/home/user/.local/bin'，但该路径不在 PATH 中。",
  "regex": "WARNING:\\ The\\ script\\ somecli\\ is\\ installed\\ in\\ '/home/user/\\.local/bin'\\ which\\ is\\ not\\ on\\ PATH\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "pip installed the console script into a user-level bin directory that is not included in the shell's PATH.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 将控制台脚本安装到了用户级 bin 目录，而该目录未包含在 shell 的 PATH 中。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Installs to system paths and can break the user environment; also creates root-owned files.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Path configuration is unrelated to reinstall behavior.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Only works if the package exposes a `__main__` module; many CLI packages do not.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "echo 'export PATH=\"$HOME/.local/bin:$PATH\"' >> ~/.bashrc && source ~/.bashrc",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "python -m venv .venv && source .venv/bin/activate && pip install somecli",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-04-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}