{
  "id": "pip/network-proxy-authentication-407",
  "signature": "WARNING: Retrying (Retry(total=0)) after connection broken by 'ProxyError': ('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required'))",
  "signature_zh": "警告：在连接被 'ProxyError' 中断后重试（重试总数=0）：('无法连接到代理。', error('隧道连接失败：需要 407 代理身份验证'))",
  "regex": "WARNING: Retrying \\(Retry\\(total=0\\)\\) after connection broken by 'ProxyError': \\('Cannot connect to proxy\\.', error\\('Tunnel connection failed: 407 Proxy Authentication Required'\\)\\)",
  "domain": "pip",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "pip is behind a corporate proxy that requires authentication, but the proxy credentials are missing or incorrect in the environment or pip configuration.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 位于需要身份验证的企业代理后面，但环境或 pip 配置中缺少或错误的代理凭据。",
  "versions": [
    {
      "version": "pip 24.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "urllib3 2.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Setting HTTP_PROXY and HTTPS_PROXY without credentials still fails with 407; authentication is required.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling proxy detection with '--proxy \"\"' may work only if the machine has direct internet access, but often fails in corporate networks.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using 'pip install --trusted-host pypi.org' bypasses SSL checks but does not solve proxy authentication.",
      "fail_rate": 0.98,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set proxy with credentials in environment variables: 'set HTTP_PROXY=http://user:password@proxy.company.com:8080' and 'set HTTPS_PROXY=http://user:password@proxy.company.com:8080' on Windows, or export on Linux/Mac.",
      "success_rate": 0.9,
      "how": "Set proxy with credentials in environment variables: 'set HTTP_PROXY=http://user:password@proxy.company.com:8080' and 'set HTTPS_PROXY=http://user:password@proxy.company.com:8080' on Windows, or export on Linux/Mac.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure pip's proxy globally: 'pip config set global.proxy http://user:password@proxy.company.com:8080'",
      "success_rate": 0.85,
      "how": "Configure pip's proxy globally: 'pip config set global.proxy http://user:password@proxy.company.com:8080'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a proxy authentication helper like 'cntlm' to handle NTLM auth and set HTTP_PROXY to localhost:3128.",
      "success_rate": 0.75,
      "how": "Use a proxy authentication helper like 'cntlm' to handle NTLM auth and set HTTP_PROXY to localhost:3128.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在环境变量中设置带凭据的代理：Windows 上使用 'set HTTP_PROXY=http://user:password@proxy.company.com:8080' 和 'set HTTPS_PROXY=http://user:password@proxy.company.com:8080'，Linux/Mac 上使用 export。",
    "全局配置 pip 的代理：'pip config set global.proxy http://user:password@proxy.company.com:8080'",
    "使用代理身份验证助手如 'cntlm' 处理 NTLM 认证，并将 HTTP_PROXY 设置为 localhost:3128。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/configuration/#environment-variables",
  "official_doc_section": null,
  "error_code": "407",
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.85,
  "resolvable": "partial",
  "first_seen": "2024-06-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}