{
  "id": "python/uvloop-install-failure",
  "signature": "ModuleNotFoundError: No module named 'uvloop'",
  "signature_zh": "ModuleNotFoundError: 没有名为 'uvloop' 的模块",
  "regex": "ModuleNotFoundError:\\ No\\ module\\ named\\ 'uvloop'",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "uvloop is not installed, or the wheel is unavailable for the current Python/platform combination (e.g. Windows, some Alpine builds), so import fails.",
  "root_cause_type": "generic",
  "root_cause_zh": "uvloop 未安装，或当前 Python/平台组合（如 Windows、某些 Alpine 构建）没有可用的 wheel，导致导入失败。",
  "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": "Still fails on Windows and Alpine musl; no wheel exists.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Pre-releases rarely add platform support for musl/Windows.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Works but silently falls back to the default loop; performance assumptions may be wrong.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Install with platform guards:\n\npip install 'uvloop; sys_platform != \"win32\"'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Use winloop on Windows as a drop-in replacement:\n\nif sys.platform == 'win32':\n    import winloop as uvloop",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "On Alpine, install build deps: apk add --no-cache python3-dev gcc musl-dev libffi-dev && pip install uvloop",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-29",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}