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

Windows环境安装langchain-chroma遇编译器未知错误求助

解决numpy编译时找不到编译器的问题

方案1:安装Visual Studio Build Tools(推荐)

  • 下载Visual Studio Build Tools安装包,运行后选择「桌面开发使用C++」工作负载,务必勾选以下核心组件:
    • MSVC v143 - VS 2022 C++ x64/x86生成工具
    • 对应你Windows版本的Windows SDK
    • C++ CMake工具 for Windows
  • 安装完成后重启终端,重新执行pipenv run pip install langchain-chroma。若仍报错,打开「x64 Native Tools Command Prompt for VS 2022」,在该终端内运行pipenv命令,确保VS环境变量正确加载。

方案2:使用MinGW-w64作为替代编译器

  • 下载MinGW-w64安装器,选择x86_64架构,线程模型选posix,异常处理选seh。
  • 将MinGW安装目录下的bin文件夹(例如C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\bin)添加到系统环境变量PATH的最前端。
  • 重启终端后执行pipenv run pip install langchain-chroma,此时pip会自动调用MinGW完成numpy编译。

方案3:直接安装预编译numpy包(跳过本地编译)

  • 先卸载残留的numpy:pipenv run pip uninstall -y numpy
  • 执行pipenv run pip install numpy<2.0.0,>=1.26.2 --only-binary :all:,强制使用预编译的wheel包,彻底绕过本地编译环节。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.14 16:32:03