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

如何解决安装pyproject.toml项目时Could not build wheels for multidict报错?

错误核心

安装multidict过程中,VC++链接器 C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x86\link.exe 返回退出码1120,导致无法构建wheel,该错误源于子进程,与pip无关。

解决步骤

  • 检查Visual Studio Build Tools组件完整性
    打开Visual Studio Installer,确认已安装C++构建工具,包含最新MSVC编译器、Windows SDK,以及「C++ ATL for latest v143 build tools」等可选组件。安装完成后重启终端,再尝试安装multidict。

  • 强制使用预编译wheel包
    跳过本地编译,直接安装预编译版本:

    1. 卸载残留的multidict:pip uninstall -y multidict
    2. 执行安装命令:pip install multidict --only-binary :all:
  • 匹配Python与工具链架构
    若使用64位Python,需确保VC++工具链为64位架构:
    在命令提示符中执行:
    set VCVARS_PLATFORM=x64
    随后执行 pip install multidict

  • 更新构建工具版本
    先升级pip、setuptools、wheel到最新版:
    pip install --upgrade pip setuptools wheel
    完成后再次尝试安装multidict。

内容的提问来源于stack exchange,提问作者Abdul Hadi Zulfiqar Ali

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.01 05:22:16