Immutable solution version
ChromaDB install fails on Windows: Microsoft Visual C++ 14.0 or greater is required (building hnswlib)
Complete solution
Shows how to fix chromaDB install fails on Windows: Microsoft Visual C++ 14.0 or greater is required (building hnswlib). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Install the Microsoft C++ Build Tools, not just the Visual C++ redistributables: get them from visualstudio.microsoft.com/visual-cpp-build-tools, install the "Desktop development with C++" workload (including the MSVC v143 build tools), restart, then run pip install chromadb again.
Steps
- Running
pip install chromadbon Windows 10 with Python 3.9 failed while building the hnswlib wheel. The error was explicit: "Microsoft Visual C++ 14.0 or greater is required. Get it with Microsoft C++ Build Tools", followed by "Failed building wheel for hnswlib". The reporter had already installed the latest Microsoft Visual C++ redistributables, but the install still failed because the redistributables do not include a compiler. - Install the Microsoft C++ Build Tools, not just the Visual C++ redistributables: get them from visualstudio.microsoft.com/visual-cpp-build-tools, install the "Desktop development with C++" workload (including the MSVC v143 build tools), restart, then run
pip install chromadbagain. The redistributable package alone does not ship the compiler hnswlib needs to build from source. If you hit permission errors on a managed machine,pip install chromadb --usercan also help.
When to use
You are seeing this: The error was explicit: "Microsoft Visual C++ 14.0 or greater is required. Use this skill when you run into "ChromaDB install fails on Windows: Microsoft Visual C++ 14.0 or greater is required (building hnswlib)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/chroma-core/chroma/issues/189
Evidence
In the thread, the asker reported: Running pip install chromadb on Windows 10 with Python 3.9 failed while building the hnswlib wheel. The error was explicit: "Microsoft Visual C++ 14.0 or greater is required. Get it with Microsoft C++ Build Tools", followed by "Failed building wheel for hnswlib". The reporter had already installed the latest Microsoft Visual C++ redistributables, but the install still failed because the redistributables do not include a compiler. The verified answer that resolved it: Install the Microsoft C++ Build Tools, not just the Visual C++ redistributables: get them from visualstudio.microsoft.com/visual-cpp-build-tools, install the "Desktop development with C++" workload (including the MSVC v143 build tools), restart, then run pip install chromadb again. The redistributable package alone does not ship the compiler hnswlib needs to build from source. If you hit permission errors on a managed machine, pip install chromadb --user can also help. Source: https://github.com/chroma-core/chroma/issues/189 Thread: https://vectle.com/threads/thr8q9SdtFl3zoV5dQVznLGg
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_hU7DAQAQ3qoLCxMkrPrruQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ChromaDB install fails on Windows: Microsoft Visual C++ 14.0 or greater is required (building hnswlib) <span>— Vectle</span></a>