chroma
chroma copied to clipboard
chromadb fails to install on windows 10 and python 3.9
`Building wheels for collected packages: hnswlib Building wheel for hnswlib (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for 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 hnswlib Failed to build hnswlib ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects`
I have also install the latest Microsoft Visual C++ redistributions but it is still giving the error
@taqihaider7 install python3.9 dev and install again,
In my case:
- installed python3.10-dev properly
- update gcc to latest.
this resolved for me
don't it work on windows because on my friend's system with same specification it is working.
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.
Next, navigate to "Individual components", find these two

In your case, you should choose Windows 10 SDK

The above fixes still dont work for me.
This code will be the last of me!!😡
The above fixes still dont work for me.
This code will be the last of me!!😡
You mad?
@HoiDam please be kind. It does sound frustrating.
@HoiDam please be kind. It does sound frustrating.
Yaaa. But it works in my machine.
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.
Next, navigate to "Individual components", find these two
In your case, you should choose Windows 10 SDK
this really worked for me. Thanks a lot!!! :)
Yes, this solved my exact same problem. thanks.
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.
Next, navigate to "Individual components", find these two
In your case, you should choose Windows 10 SDK
It worked on my windows machine too!
what to do after installing these files
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.
Next, navigate to "Individual components", find these two
In your case, you should choose Windows 10 SDK
Thanks a lot for this.
It worked perfectly :)
This works for me as well. Thank you.
Ok got it.... so a long winded solution for my use case but here it goes:
-
download https://visualstudio.microsoft.com/visual-cpp-build-tools/
-
however you have to navigate to "Individual components", find select those that were called out above:
-
finish the install
-
reboot computer
-
Then did a !pip install chromadb==0.3.26 selecting this specific version which worked for me
Solutions I tried but didn't work for me, however worked for others:
-
!pip install wheel
-
!pip install --upgrade setuptools
The solution worked for me too :)
For those who are looking for where to find individual components, you will have to click on "Download Build Tools" as shown in the snapshot attached. Install the .exe file and you will see a window that pops up with a tab called "Individual components"
I still couldn't install chromadb after downloading and installing build tools. However, here is what worked for me in steps below:
I had lots of problems installing chromadb but I finally installed it today using a pip command.
Here is what worked for me: 1- In VS, go to Tools>Get Tools and Features.
2- Under workloads, make sure Desktop development with C++ is installed.
3- Create a conda Virtual Environment and choose Python version 3.10. You can do it the Anaconda Command prompt using the following command: conda create -n env-01 python 3.10
4- In Anaconda Prompt, make sure you are in the project directory where you installed the environment and type: conda activate env-01
5- Try pip install chromadb
If it works, then you can use this environment for your project in Visual Studio Code.
Some references about setting up environments in Visual Studio Code.
https://code.visualstudio.com/docs/python/environments
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first.
Next, navigate to "Individual components", find these two
In your case, you should choose Windows 10 SDK
Thanks my friend, it worked very well
Hi, I tried and installed my machined VC++ and checked control panel - >program & features.
After i tried to install chromadb then system throw same error
I think my path not taking VC++ redistributable pakage at that time of compiling.
I installed python 3.11.
Kindly help me out
The above fixes still dont work for me.
This code will be the last of me!!😡
I can feel you man.
I have installed sdk 11 and msvc too but it still shows this
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for typed-ast
Failed to build Pillow typed-ast
ERROR: Could not build wheels for Pillow, typed-ast, which is required to install pyproject.toml-based projects
this is the question stackoverflow: Link i'm using python 3.11.
I tried above solution but it isn't working for me. I am using Windows 10 and Python 3.9
I've met the same issue on Windows 11 Python 3.11.8 Solution:
- Install Python 3.10
py -3.10 -m pip install chromadb
Had the same issue. Reinstalling MSVC didn't work.
I was trying to install chromadb on a Python 3.12 environment.
The main issue comes from installing the dependency hnswlib but was not able to find a solution.
I rebuilt the environment with Python 3.10 and it works just fine.
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first. Next, navigate to "Individual components", find these two
In your case, you should choose Windows 10 SDK
Thanks a lot for this.
It worked perfectly :)
What is i am using Windows 10? should i install windows 11 SDK in any case?
You need to download https://visualstudio.microsoft.com/visual-cpp-build-tools/ first. Next, navigate to "Individual components", find these two
In your case, you should choose Windows 10 SDK
Thanks a lot for this. It worked perfectly :)
What is i am using Windows 10? should i install windows 11 SDK in any case?
It looks like the answer your question is in the message you replied to.
In your case, you should choose Windows 10 SDK
Thanks a lot for the solution solved the build issue with ChromaDB installation!
i tried every possible ways but i couldnt resolve this issue. I was trying to install dependencies for localGPT. Please share any solutions for this.