安装命令:
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.下载
2.下载成功后进行安装,安装的时候要勾选 **使用C的桌面开发**
3.选择一下位置,因为默认安装在C盘
4.安装成功后显示
再次执行 pip install chromadb
因为已经安装过C++环境,所以就能成功了
评论区