You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法安装mysql-connector-python==3.7.3,请求技术支持解决安装问题

解决mysql-connector-python==3.7.3安装失败问题

执行命令及错误信息

C:\Users\a0229010>python -m pip install mysql-connector-python==3.7.3

Collecting mysql-connector-python3.7.3
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017975C3B5C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/mysql-connector-python/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017975C3BB38>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/mysql-connector-python/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017975C3B7B8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/mysql-connector-python/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017975C3B438>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/mysql-connector-python/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000017975C3BF60>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/mysql-connector-python/
ERROR: Could not find a version that satisfies the requirement mysql-connector-python
3.7.3 (from versions: none)
ERROR: No matching distribution found for mysql-connector-python==3.7.3

解决步骤

  • 检查网络连接:确认当前网络能正常访问外网,若公司网络有代理限制,可切换至手机热点等无限制网络重试。
  • 更换国内pip镜像源:默认PyPI源访问不稳定,使用国内镜像加速安装,执行命令:
    python -m pip install mysql-connector-python==3.7.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  • 核实版本有效性:mysql-connector-python的3.7系列最高版本为3.7.2,不存在3.7.3版本。若无需指定特定版本,可直接安装最新兼容版本:
    python -m pip install mysql-connector-python -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  • 本地whl文件安装:若上述方法仍失败,可从国内镜像站下载对应Python版本、系统位数的whl文件(如Python3.8+Windows64位对应mysql_connector_python-3.7.2-cp38-cp38-win_amd64.whl),然后执行本地安装命令:
    pip install mysql_connector_python-3.7.2-cp38-cp38-win_amd64.whl
    

内容的提问来源于stack exchange,提问作者jaypeeee10

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 18:01:21