chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Install issue]: Cannot install on Python 3.12 because of missing wheels for chroma-hnswlib

Open aersam opened this issue 1 year ago • 5 comments

What happened?

When trying to install chroma on python 3.12, it has to build chroma-hnswlib , since this one does not have Python 3.12 wheels. This is a blocker in my restricted environment where I cannot just install build dependencies

Versions

Chroma 0.5.0 Python 3.12 OS is some Linux, managed by Azure Websites

Relevant log output

No response

aersam avatar Apr 25 '24 11:04 aersam

I've encountered numerous challenges with version 3.12 across various platforms like torch, tensorflow, etc.

  1. Consider reverting back to version 3.11, most libraries and frameworks are compatible with it.

  2. If version 3.12 is a necessity, you could experiment with using conda, although I haven't personally tested this approach.

  3. Another option is to downgrade the ChromaDB package to version 0.4.24 using pip install chromadb==0.4.24. While it may not directly relate to your issues, it's worth a shot.

mantrakp04 avatar Apr 25 '24 16:04 mantrakp04

I made different experience, chroma is the only blocker in my project. All other projects work with 3.12. I personally really like the wheels, makes installation much simpler (especially on Windows) and I try to not use native code that does not keep up with new python versions within at least a year

aersam avatar Apr 26 '24 05:04 aersam

Possible solutions:

  1. Use conda
  2. Use docker w/wsl on 3.11 (highly recommended for windows user)
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 AS base

ENV DEBIAN_FRONTEND=noninteractive
ARG ROOT_PASSWORD

RUN apt-get update && \
    apt-get install -y software-properties-common && \
    add-apt-repository ppa:deadsnakes/ppa && \
    apt-get install -y \
    ffmpeg \
    git \
    curl \
    gpg \
    wget \
    nano \
    build-essential \
    libssl-dev \
    pkg-config \
    python3.11 \
    python3.11-venv \
    python3.11-distutils \
    python3.11-dev \
    libgl1-mesa-glx \
    libglib2.0-0 \
    uvicorn \
    redis-server \
    redis \
    dos2unix \
    screen \
    sudo \
    openssh-server \
    libhdf5-dev \
    && rm -rf /var/lib/apt/lists/* && \
    python3.11 -m ensurepip && \
    mkdir /var/run/sshd && \
    echo "root:${ROOT_PASSWORD}" | chpasswd && \
    sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
    sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config

RUN curl -sL "https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64" --output /tmp/vscode-cli.tar.gz && \
    tar -xf /tmp/vscode-cli.tar.gz -C /tmp && \
    mv /tmp/code /usr/local/bin/code && \
    rm -rf /tmp/vscode-cli.tar.gz /tmp/VSCode-linux-x64

# Start the code tunnel
WORKDIR /workspace

ENV VSCODE_AGENT_FOLDER=/workspace/.vscode
ENV VSCODE_CLI_DATA_DIR=/workspace/.vscode

CMD ["/bin/bash", "-c", "code tunnel user login --provider github && code tunnel --accept-server-license-terms --disable-telemetry --name devtnl"]
  1. You can always use a different service or make your own wrapper around chromadb, as at the end of the day its just restapi (which can be accessed by starting the chromadb uvicorn server)

mantrakp04 avatar Apr 26 '24 06:04 mantrakp04

So if I understand you correctly, I cannot expect wheels for Python 3.12 anytime soon and there are no plans to add those wheels?

aersam avatar Apr 26 '24 10:04 aersam

@aersam thank you for reporting this! @HammadB and @atroyn are working on it

beggers avatar May 02 '24 19:05 beggers

I got the same problem,the reply below works for me: https://github.com/chroma-core/chroma/issues/250#issuecomment-1540934224

Ashlyn1997 avatar Jul 01 '24 10:07 Ashlyn1997

It seems these wheel now exist. I'll close this one

aersam avatar Aug 28 '24 11:08 aersam