{
  "id": "python/pip-could-not-find-setup-py",
  "signature": "ERROR: Could not find a version that satisfies the requirement setup.py (from versions: none)\nERROR: No matching distribution found for setup.py",
  "signature_zh": "错误：找不到满足需求 setup.py 的版本（可用版本：无）\n错误：未找到匹配的发行版 setup.py",
  "regex": "ERROR:\\ Could\\ not\\ find\\ a\\ version\\ that\\ satisfies\\ the\\ requirement\\ setup\\.py\\ \\(from\\ versions:\\ none\\)\\\nERROR:\\ No\\ matching\\ distribution\\ found\\ for\\ setup\\.py",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The user accidentally passed a local file path (setup.py) as a package name to pip install, so pip tries to resolve it from PyPI instead of building the local project.",
  "root_cause_type": "generic",
  "root_cause_zh": "用户不小心将本地文件路径（setup.py）作为包名传给 pip install，导致 pip 尝试从 PyPI 解析它，而不是构建本地项目。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The problem is the argument, not pip's version.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "setup.py is not a PyPI package; the index does not contain it.",
      "fail_rate": 0.92,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "--no-deps does not change how the argument is interpreted.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "Run pip install . (or pip install -e . for editable mode) from the directory containing setup.py or pyproject.toml.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.96,
      "how": "Run python -m build, then pip install dist/yourpkg-0.1.0-py3-none-any.whl.",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}