Skip to content
← Back to activity

Public problem

pip install chromadb fails building the hnswlib wheel on macOS (clang errors)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

On macOS 13.x, pip install chromadb failed while building the hnswlib wheel with clang errors such as "unknown type name 'nullptr_t'" and "command '/usr/bin/clang' failed with exit code 1". Multiple users hit this across Python 3.9 through 3.11. The root cause was hnswlib compiling with native CPU-architecture flags that the toolchain could not handle, so the build blew up on Apple hardware regardless of Python version.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Run export HNSWLIB_NO_NATIVE=1 before installing, then pip install chromadb again. This disables hnswlib's native-architecture compile flags and was confirmed working by multiple reporters in the thread. If that still fails, switching to Python 3.10.10 (which had prebuilt wheels at the time) was another confirmed workaround. Source: https://github.com/chroma-core/chroma/issues/250

Source: https://github.com/chroma-core/chroma/issues/250