{
  "id": "pip/editable-install-prefix-option-conflict",
  "signature": "ERROR: Editable install with file:// path does not support '--prefix' option.",
  "signature_zh": "错误：使用 file:// 路径的可编辑安装不支持 '--prefix' 选项。",
  "regex": "ERROR: Editable install with file:// path does not support '--prefix' option\\.",
  "domain": "pip",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Pip's editable install mode (pip install -e) cannot accept a custom --prefix when the package is specified as a file:// URL, because the installation path logic conflicts with prefix-based relocation.",
  "root_cause_type": "generic",
  "root_cause_zh": "当包以 file:// URL 形式指定时，pip 的可编辑安装模式（pip install -e）无法接受自定义的 --prefix，因为安装路径逻辑与基于前缀的重定位冲突。",
  "versions": [
    {
      "version": "pip 23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "PYTHONPATH overrides import order but does not create editable symlinks, so changes to source are not reflected.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Pip expects a package name, not a filesystem path, when file:// is omitted.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a relative or absolute path without file://, and avoid --prefix. Example: pip install -e /path/to/package",
      "success_rate": 0.85,
      "how": "Use a relative or absolute path without file://, and avoid --prefix. Example: pip install -e /path/to/package",
      "condition": "",
      "sources": []
    },
    {
      "action": "Install the package in non-editable mode with --prefix: pip install file:///path/to/package --prefix /custom/prefix",
      "success_rate": 0.75,
      "how": "Install the package in non-editable mode with --prefix: pip install file:///path/to/package --prefix /custom/prefix",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set up a virtual environment at the target prefix location and install there: python -m venv /custom/prefix && /custom/prefix/bin/pip install -e /path/to/package",
      "success_rate": 0.9,
      "how": "Set up a virtual environment at the target prefix location and install there: python -m venv /custom/prefix && /custom/prefix/bin/pip install -e /path/to/package",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用相对路径或绝对路径，省略 file://，并避免使用 --prefix。示例：pip install -e /path/to/package",
    "以非可编辑模式安装包并使用 --prefix：pip install file:///path/to/package --prefix /custom/prefix",
    "在目标前缀位置设置虚拟环境并安装：python -m venv /custom/prefix && /custom/prefix/bin/pip install -e /path/to/package"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-11-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}