{
  "id": "pip/wheel-install-fails-with-errno-36-file-name-too-long",
  "signature": "ERROR: Could not install packages due to an OSError: [Errno 36] File name too long",
  "signature_zh": "错误：无法安装包，因为 OSError：[Errno 36] 文件名太长",
  "regex": "ERROR: Could not install packages due to an OSError: \\[Errno 36\\] File name too long",
  "domain": "pip",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The extracted wheel file or a path within it exceeds the filesystem's maximum filename length (typically 255 bytes on Linux/ext4, 260 characters on Windows).",
  "root_cause_type": "generic",
  "root_cause_zh": "解压后的 wheel 文件或其内部路径超过了文件系统的最大文件名长度（Linux/ext4 上通常为 255 字节，Windows 上为 260 个字符）。",
  "versions": [
    {
      "version": "pip 21.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.6-3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Linux kernel 5.x+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Windows 10/11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using --no-cache-dir option to avoid cache path issues",
      "why_fails": "The error occurs during wheel extraction, not caching; the filename length issue remains regardless of cache.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrading pip to the latest version",
      "why_fails": "This is an OS-level filesystem limitation; pip's version does not affect filename length constraints.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running pip as administrator or root",
      "why_fails": "Administrator privileges cannot override filesystem filename length limits.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "pip install <package> --target /tmp/shorter-path",
      "success_rate": 0.8,
      "how": "pip install <package> --target /tmp/shorter-path",
      "condition": "",
      "sources": []
    },
    {
      "action": "pip install <package> --no-compile --no-deps --no-build-isolation",
      "success_rate": 0.7,
      "how": "pip install <package> --no-compile --no-deps --no-build-isolation",
      "condition": "",
      "sources": []
    },
    {
      "action": "On Linux: install to a filesystem with longer filename limits (e.g., XFS or ext4 with dir_nlink) or use a symlink to shorten the path: mkdir -p /tmp/shortpip && ln -s /tmp/shortpip ~/shortpip && pip install <package> --target ~/shortpip",
      "success_rate": 0.85,
      "how": "On Linux: install to a filesystem with longer filename limits (e.g., XFS or ext4 with dir_nlink) or use a symlink to shorten the path: mkdir -p /tmp/shortpip && ln -s /tmp/shortpip ~/shortpip && pip install <package> --target ~/shortpip",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "pip install <包名> --target /tmp/短路径",
    "pip install <包名> --no-compile --no-deps --no-build-isolation",
    "在 Linux 上：安装到具有较长文件名限制的文件系统（例如 XFS 或带 dir_nlink 的 ext4），或使用符号链接缩短路径：mkdir -p /tmp/shortpip && ln -s /tmp/shortpip ~/shortpip && pip install <包名> --target ~/shortpip"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.python.org/3/library/os.html#os.pathconf",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.75,
  "resolvable": "partial",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}