chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Bug]: Fails to install using Python 3.13 on Ubuntu 24.04.2

Open wigging opened this issue 6 months ago • 3 comments

What happened?

I'm using uv to install and run a Python project. The pyproject.toml is shown below. I use uv sync to create the virtual environment and install all the dependencies. But chromadb fails to install because of an unsupported compiler error which states that at least C++11 support is needed.

[project]
name = "my-project"
version = "25.4"
requires-python = ">=3.13"
dependencies = [
    "chromadb>=1.0.7",
    "llama-index>=0.12.33",
    "llama-index-retrievers-bm25>=0.5.2",
    "llama-index-vector-stores-chroma>=0.4.1",
    "markdown-pdf>=1.7",
    "pdfplumber>=0.11.6",
    "streamlit>=1.44.1",
]

[dependency-groups]
dev = [
    "ruff>=0.11.6",
]

[tool.pyright]
pythonVersion = "3.13"
venvPath = "."
venv = ".venv"

[tool.ruff]
line-length = 100

[tool.uv]
python-preference = "only-managed"

If I switch to Python 3.12 then everything works fine. See below for revised pyproject.toml.

[project]
name = "my-project"
version = "25.4"
requires-python = "==3.12.*"
dependencies = [
    "chromadb>=1.0.7",
    "llama-index>=0.12.33",
    "llama-index-retrievers-bm25>=0.5.2",
    "llama-index-vector-stores-chroma>=0.4.1",
    "markdown-pdf>=1.7",
    "pdfplumber>=0.11.6",
    "streamlit>=1.44.1",
]

[dependency-groups]
dev = [
    "ruff>=0.11.7",
]

[tool.pyright]
pythonVersion = "3.12"
venvPath = "."
venv = ".venv"

[tool.ruff]
line-length = 100

[tool.uv]
python-preference = "only-managed"

Versions

Here are the system specs:

OS: Ubuntu 24.04.2 LTS x86_64
Kernel: Linux 6.8.0-57-generic
Shell: bash 5.2.21
CPU: 4 x AMD EPYC 7702 64-Core (4) @ 2.00 GHz
GPU: Cirrus Logic GD 5446
Memory: 661.54 MiB / 14.63 GiB

Here are the Python and package versions (also see pyproject.toml contents):

Python: 3.13
chromadb: 1.0.7
llama-index: 0.12.33
llama-index-retrievers-bm25: 0.5.2
llama-index-vector-stores-chroma: 0.4.1
markdown-pdf: 1.7
pdfplumber: 0.11.6
streamlit: 1.44.1

Relevant log output

Here is the log output with the error.


× Failed to build `chroma-hnswlib==0.7.6`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
      [stdout]
      running bdist_wheel
      running build
      running build_ext
      creating tmp
      clang++ -pthread -fno-strict-overflow -Wsign-compare
      -Wunreachable-code -DNDEBUG -g -O3 -Wall -fPIC -fPIC

RuntimeError: Unsupported compiler -- at least C++11 support is needed!
hint: This usually indicates a problem with the package or the build environment.
help: `chroma-hnswlib` (v0.7.6) was included because `info-retrieval`
    (v25.4) depends on `chromadb` (v1.0.6) which depends on `chroma-hnswlib`

wigging avatar Apr 25 '25 15:04 wigging