Skip to content

Instantly share code, notes, and snippets.

@ashmalvayani
Last active November 20, 2024 22:02
Show Gist options
  • Save ashmalvayani/ab3f4a8469fe3a2e9904c3a2674ea947 to your computer and use it in GitHub Desktop.
Save ashmalvayani/ab3f4a8469fe3a2e9904c3a2674ea947 to your computer and use it in GitHub Desktop.
SOLUTION: ChromaDB - chroma-hnswlib build error
Chromadb specifically works on python version 3.10.10. Saw on other github issues that it does not work with other python versions.
to install chromadb, write the following command:
pip install chromadb
if you are getting the following build error:
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
----------------
Then do the following:
1. install VS C++ build tools by following this website:
https://learn.microsoft.com/en-us/answers/questions/136595/error-microsoft-visual-c-14-0-or-greater-is-requir
2. Once the installation is complete, close your terminal where you were installing the module and open a new terminal and run the command again.
3. It will work.
@imaliabdullah
Copy link

Hi All, Faced the same issue about ERROR: Failed building wheel for chroma-hnswlib

Then as per help from StackOverflow installed the VS and selected Indivdual Components. However, it did not worked. Then I added below package as shown in image and it works fine.

image

Note: Using Windows 10 x64-bit

It's also help me to resolve my issue thanks!

@mayankshukla94
Copy link

Hi All, Faced the same issue about ERROR: Failed building wheel for chroma-hnswlib

Then as per help from StackOverflow installed the VS and selected Indivdual Components. However, it did not worked. Then I added below package as shown in image and it works fine.

image

Note: Using Windows 10 x64-bit

Worked for Windows 11 as well

@Fernando7181
Copy link

Hi All, Faced the same issue about ERROR: Failed building wheel for chroma-hnswlib

Then as per help from StackOverflow installed the VS and selected Indivdual Components. However, it did not worked. Then I added below package as shown in image and it works fine.

image

Note: Using Windows 10 x64-bit

This work, youre a god man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment