{
  "id": "python/pip-legacy-version-scheme",
  "signature": "WARNING: The script foo is installed in '/home/user/.local/bin' which is not on PATH.\n  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.",
  "signature_zh": "警告：脚本 foo 安装在 '/home/user/.local/bin'，该目录不在 PATH 中。\n  请考虑将此目录添加到 PATH，或若希望抑制此警告，请使用 --no-warn-script-location。",
  "regex": "WARNING:\\ The\\ script\\ foo\\ is\\ installed\\ in\\ '/home/user/\\.local/bin'\\ which\\ is\\ not\\ on\\ PATH\\.\\\n\\ \\ Consider\\ adding\\ this\\ directory\\ to\\ PATH\\ or,\\ if\\ you\\ prefer\\ to\\ suppress\\ this\\ warning,\\ use\\ \\-\\-no\\-warn\\-script\\-location\\.",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "pip installed console_scripts into the user site bin directory (because of --user or a non-activated venv), but that directory is not on the shell's PATH, so the command isn't found.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于使用了 --user 或未激活的 venv，pip 将 console_scripts 安装到用户 site bin 目录，但该目录不在 shell 的 PATH 中，因此找不到命令。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Suppresses the warning but the script still lands off-PATH; running foo still gives command not found.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Reinstalls to the same location; PATH is unchanged so the command remains undiscoverable.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Add the dir to PATH: export PATH=\"$HOME/.local/bin:$PATH\"  # append to ~/.bashrc or ~/.zshrc to persist",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "Use a venv so scripts install into the active env: python -m venv .venv && . .venv/bin/activate && pip install foo",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-21",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}