chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
14.79k stars 1.23k forks source link

[Install issue]: Pip dependency issues with Chroma & backoff (used by opentelemetry-exporter-otlp-proto-grpc) #2086

Open ajram23 opened 5 months ago

ajram23 commented 5 months ago

What happened?

Having dependency issues with backoff. The conflict is caused by: langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.11.1 depends on backoff<2.0.0 and >=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.11.0 depends on backoff<2.0.0 and >=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.10.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.9.1 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.9.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.8.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.7.1 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.7.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.6.2 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.6.1 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.6.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.5.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.4.1 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.4.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.3.0 depends on backoff~=1.10.0 langfuse 2.27.3 depends on backoff<3.0.0 and >=2.2.1 posthog 3.5.0 depends on backoff>=1.10.0 opentelemetry-exporter-otlp-proto-grpc 1.2.0 depends on backoff~=1.10.0

Any recommendations on how to resolve this?. Please and thank you!

Versions

Chroma 0.5, Mac OS 17.X, Python 3.12.2

Relevant log output

No response

beggers commented 5 months ago

hey @ajram23 !

Are you installing chroma in a virtual environment? This looks like chroma requires a conflicting version of a package from one you have installed on your system.

ajram23 commented 5 months ago

@beggers Yes I am and I understand that it is. backoff version that you folks seem to be using is pretty old and others have moved on to newer ones. opentelemetry-exporter-otlp-proto-grpc has also seems to be have updated https://pypi.org/project/opentelemetry-exporter-otlp-proto-grpc/#history So wondering if you have a recommendation on how to work around this issue? I have also asked the langfuse team if they can support backoff>=1.10.0 but for now I am stuck! Any help is greatly appreciated!

beggers commented 5 months ago

Hm, this is strange.

opentelemetry-exporter-otlp-proto-grpc dropped backoff as a requirement in version 1.23.0 so I would expect you to be able to just pull that. My attempts to reproduce this issue fail with the current requirements.txt since it just installs a newer version of the library.

In any event, I'll bump the version explicitly on our end which will hopefully fix this for you.

https://github.com/chroma-core/chroma/pull/2111

ajram23 commented 5 months ago

Yeah I agree. It is strange that pip complains about it but pipdeptree doesn't show it. Also posthog seems to be ok with any version over 1.10.X "posthog 3.5.0 depends on backoff>=1.10.0"

Either ways I appreciate the help!

MrZoidberg commented 3 months ago

@beggers hey. just case across this issue googling for my problem. I was trying to build a docker container with python app and chroma-client dependency for arm64 and it failed due to some dependencies in opentelemetry-exporter-otlp-proto-grpc that is used by chroma-client. Is it possible to make this dependency optional?

beggers commented 3 months ago

Hey @MrZoidberg! I no longer work at Chroma but @HammadB or @sanketkedia may be able to help you out.

tazarov commented 2 months ago

@MrZoidberg, Here's a solution for alpine on arm64:

FROM python:3.11-alpine as base
RUN apk update && apk add --no-cache \
    build-base \
    python3-dev \
    gcc musl-dev \
    protobuf-dev \
    grpc-plugins

RUN pip install chromadb-client