Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aersam opened this issue Apr 25, 2024 · 5 comments
Labels
installation trouble trouble building or installing chroma

Comments

@aersam
Copy link

aersam commented Apr 25, 2024

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 aersam added the installation trouble trouble building or installing chroma label Apr 25, 2024
@mantrakp04
Copy link

mantrakp04 commented Apr 25, 2024

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.

@aersam
Copy link
Author

aersam commented Apr 26, 2024

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

@mantrakp04
Copy link

mantrakp04 commented Apr 26, 2024

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)

@aersam
Copy link
Author

aersam commented Apr 26, 2024

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?

@beggers
Copy link
Member

beggers commented May 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation trouble trouble building or installing chroma
Projects
None yet
Development

No branches or pull requests

3 participants