chroma-core / chroma-core/chroma
[Bug]: chromadb python package needs Visual C++ runtime on Windows
- Dominant language
- Rust
- Stars
- 29.3k
- Forks
- 2.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 38
Description
### What happened?
When importing the chromadb module in python on Windows, I get this error:
```
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb_rust_bindings\__init__.py", line 1, in
from .chromadb_rust_bindings import *
ImportError: DLL load failed while importing chromadb_rust_bindings: The specified module could not be found.
```
This error is likely caused because I did not have Visual C++ runtime installed. Installing VC++ fixed this error.
Here's a few things we can do:
1. Embed the C runtime inside our binary instead of linking to external DLLs
2. Figure out why this is a dependency and possible remove it
3. Figure out a way to catch this error, and give an appropriate error message w/ instructions to install VC++ <- lease invasive, bare minimum
### Versions
chromadb v1.5.2, fresh install of windows 11 25H2, python 3.11-13
### Relevant log output
```shell
PS C:\Users\Kyle\T\chroma\python> uv run --python 3.11 main.py
Using CPython 3.11.15
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Installed 78 packages in 699ms
Traceback (most recent call last):
File "C:\Users\Kyle\T\chroma\python\main.py", line 4, in
client = chromadb.Client()
^^^^^^^^^^^^^^^^^
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\__init__.py", line 460, in Client
return ClientCreator(tenant=tenant, database=database, settings=settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\api\client.py", line 68, in __init__
super().__init__(settings=settings)
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\api\shared_system_client.py", line 25, in __init__
SharedSystemClient._create_system_if_not_exists(self._identifier, settings)
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\api\shared_system_client.py", line 37, in _create_system_if_not_exists
new_system.instance(ServerAPI)
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\config.py", line 451, in instance
type = get_class(fqn, type)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\config.py", line 500, in get_class
module = importlib.import_module(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Kyle\AppData\Roaming\uv\python\cpython-3.11.15-windows-x86_64-none\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb\api\rust.py", line 50, in
import chromadb_rust_bindings
File "C:\Users\Kyle\T\chroma\python\.venv\Lib\site-packages\chromadb_rust_bindings\__init__.py", line 1, in
from .chromadb_rust_bindings import *
ImportError: DLL load failed while importing chromadb_rust_bindings: The specified module could not be found.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the Windows import failure with chromadb v1.5.2 and the listed Python versions, starting at chromadb/api/rust.py and the chromadb_rust_bindings import shown in the traceback. The issue proposes embedding the runtime, removing the dependency, or adding an explanatory error, but names no repository tests or selected outcome; done requires an agreed fix and verification for a missing VC++ runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100