Skip to content

Fixed chroma-hnswlib installation - #104

Merged
mounacheikho-cmd merged 2 commits into
climateandtech:mainfrom
mounacheikho-cmd:fix-chroma-python-312
Aug 10, 2026
Merged

Fixed chroma-hnswlib installation#104
mounacheikho-cmd merged 2 commits into
climateandtech:mainfrom
mounacheikho-cmd:fix-chroma-python-312

Conversation

@mounacheikho-cmd

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade chroma-hnswlib from 0.7.3 to 0.7.6.
  • Upgrade chromadb from 0.4.24 to 0.5.5.
  • Remove the direct pulsar-client pin because it is no longer required by ChromaDB 0.5.5 and is not used directly by this application.

Problem

chroma-hnswlib 0.7.3 does not provide a prebuilt wheel for CPython 3.12 on macOS ARM64.

When installing the requirements on Apple Silicon with Python 3.12, pip therefore falls back to the source distribution and attempts to compile the package's native C++ extension. That build fails with:

ERROR: Could not build wheels for chroma-hnswlib, which is required to install pyproject.toml-based projects

Creating a fresh virtual environment does not resolve the failure because it continues to use the same Python version and platform for which the wheel is unavailable.

Why this works

chroma-hnswlib 0.7.6 publishes a prebuilt CPython 3.12 wheel for macOS ARM64. Pip can install that binary directly instead of compiling the extension locally.

chromadb is upgraded at the same time because its dependency is pinned to a specific chroma-hnswlib version:

  • chromadb 0.4.24 requires chroma-hnswlib==0.7.3.
  • chromadb 0.5.5 requires chroma-hnswlib==0.7.6.

ChromaDB 0.5.5 also no longer requires pulsar-client, and the application does not import it directly, so the explicit pin can be removed.

Validation

Tested in a clean CPython 3.12.2 environment on macOS ARM64:

  • Installed the complete requirements.txt successfully.
  • Confirmed that pip selected the prebuilt chroma-hnswlib 0.7.6 wheel.
  • Confirmed that pulsar-client was not installed.
  • Successfully imported ChromaDB and performed an in-memory collection add/query operation.
  • Passed the test suite: 218 passed, 5 skipped.
  • Started the Streamlit application successfully.

suung
suung previously approved these changes Jul 30, 2026
Comment thread requirements.txt Outdated
@mounacheikho-cmd

Copy link
Copy Markdown
Collaborator Author

After reviewing the codebase, I found that Chroma is not imported or used by the application. Rather than upgrading an unused dependency, this PR now removes chromadb and chroma-hnswlib, which prevents pip from attempting the failing native chroma-hnswlib build on Python 3.12.

It also removes the unused pulsar-client pin from Chroma’s dependency stack and cleans up the remaining Chroma-specific logger and Docker comments.

Validation:

  • 229 tests passed, 5 skipped
  • Lint checks passed
  • No executable Chroma imports or integrations remain

@mounacheikho-cmd
mounacheikho-cmd merged commit 0818e85 into climateandtech:main Aug 10, 2026
4 checks passed
@mounacheikho-cmd
mounacheikho-cmd deleted the fix-chroma-python-312 branch August 10, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants