侧边栏壁纸
博主头像
晚风博主等级

马汇博嘛。

  • 累计撰写 17 篇文章
  • 累计创建 13 个标签
  • 累计收到 20 条评论

python安装chromadb出现 error: Microsoft Visual C++ 14.0 or greater is required..

晚风
2024-06-28 / 0 评论 / 0 点赞 / 568 阅读 / 1,030 字
温馨提示:
本文最后更新于 2024-06-28,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

安装命令:

pip install chromadb

可能出现错误:

Building wheels for collected packages: chroma-hnswlib
  Building wheel for chroma-hnswlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for chroma-hnswlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'hnswlib' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for chroma-hnswlib
Failed to build chroma-hnswlib
ERROR: Could not build wheels for chroma-hnswlib, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 23.2.1 -> 24.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip

需要去 https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/
安装c工具
安装步骤:
1.下载
image.png
2.下载成功后进行安装,安装的时候要勾选 **使用C
的桌面开发**
img.png
3.选择一下位置,因为默认安装在C盘
img.png
4.安装成功后显示
image.png

再次执行 pip install chromadb
因为已经安装过C++环境,所以就能成功了
image.png

0

评论区