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

"chromadb 0.4.24 depends on onnxruntime>=1.14.1" on python 3.12.3 #679

Open
prescriptionlifeline opened this issue May 23, 2024 · 8 comments

Comments

@prescriptionlifeline
Copy link

When I do pip3 install crewai I get this error:

ERROR: Cannot install embedchain because these package versions have conflicting dependencies.

The conflict is caused by:
    chromadb 0.4.24 depends on onnxruntime>=1.14.1
    chromadb 0.4.23 depends on onnxruntime>=1.14.1
    chromadb 0.4.22 depends on onnxruntime>=1.14.1
    chromadb 0.4.21 depends on onnxruntime>=1.14.1
    chromadb 0.4.20 depends on onnxruntime>=1.14.1
    chromadb 0.4.19 depends on onnxruntime>=1.14.1
    chromadb 0.4.18 depends on onnxruntime>=1.14.1
    chromadb 0.4.17 depends on onnxruntime>=1.14.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

I'm running Python 3.12.3.

Any ideas?

@goran-ristic-dev
Copy link

Try picking lower version of chroma.
add lower version of chroma to requirements.txt and install it first . Then install crewai

@prescriptionlifeline
Copy link
Author

Where do I find the requirements.txt? I did git clone https://github.com/joaomdmoura/crewAI.git and then find . -type f -name requirements.txt in the newly created crewAI directory and it does not appear to be in the repo.

Google suggests that I could create one with pip freeze but that appears to only work for something that you've successfully installed and I can't install crewai.

I tried to install chromadb on it's own by doing pip3 install chromadb and that installed without issue..

@prescriptionlifeline
Copy link
Author

prescriptionlifeline commented May 30, 2024

Here's the output of pip3 install crewai:

https://pastebin.com/BbDKVgay

Relevant portions of it:

Collecting embedchain<0.2.0,>=0.1.98 (from crewai)
  Downloading embedchain-0.1.104-py3-none-any.whl.metadata (10 kB)
...
Collecting chromadb<0.6.0,>=0.5.0 (from embedchain<0.2.0,>=0.1.98->crewai)
  Downloading chromadb-0.5.0-py3-none-any.whl.metadata (7.3 kB)
...
INFO: pip is looking at multiple versions of chromadb to determine which version is compatible with other requirements. This could take a while.
Collecting embedchain<0.2.0,>=0.1.98 (from crewai)
  Downloading embedchain-0.1.103-py3-none-any.whl.metadata (10 kB).
...
Collecting embedchain<0.2.0,>=0.1.98 (from crewai)
  Downloading embedchain-0.1.102-py3-none-any.whl.metadata (10 kB)
Collecting chromadb<0.5.0,>=0.4.17 (from embedchain<0.2.0,>=0.1.98->crewai)
  Downloading chromadb-0.4.24-py3-none-any.whl.metadata (7.3 kB)
...
Collecting chromadb<0.5.0,>=0.4.17 (from embedchain<0.2.0,>=0.1.98->crewai)
  Downloading chromadb-0.4.23-py3-none-any.whl.metadata (7.3 kB)
  Downloading chromadb-0.4.22-py3-none-any.whl.metadata (7.3 kB)
  Downloading chromadb-0.4.21-py3-none-any.whl.metadata (7.3 kB)
  Downloading chromadb-0.4.20-py3-none-any.whl.metadata (7.3 kB)
  Downloading chromadb-0.4.19-py3-none-any.whl.metadata (7.3 kB)
INFO: pip is still looking at multiple versions of chromadb to determine which version is compatible with other requirements. This could take a while.
  Downloading chromadb-0.4.18-py3-none-any.whl.metadata (7.4 kB)
  Downloading chromadb-0.4.17-py3-none-any.whl.metadata (7.3 kB)
Collecting embedchain<0.2.0,>=0.1.98 (from crewai)
  Downloading embedchain-0.1.101-py3-none-any.whl.metadata (10 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Downloading embedchain-0.1.100-py3-none-any.whl.metadata (10 kB)
  Downloading embedchain-0.1.99-py3-none-any.whl.metadata (10 kB)
  Downloading embedchain-0.1.98-py3-none-any.whl.metadata (10 kB)
ERROR: Cannot install embedchain because these package versions have conflicting dependencies.
 
The conflict is caused by:
    chromadb 0.4.24 depends on onnxruntime>=1.14.1
    chromadb 0.4.23 depends on onnxruntime>=1.14.1
    chromadb 0.4.22 depends on onnxruntime>=1.14.1
    chromadb 0.4.21 depends on onnxruntime>=1.14.1
    chromadb 0.4.20 depends on onnxruntime>=1.14.1
    chromadb 0.4.19 depends on onnxruntime>=1.14.1
    chromadb 0.4.18 depends on onnxruntime>=1.14.1
    chromadb 0.4.17 depends on onnxruntime>=1.14.1

crewai requires "embedchain<0.2.0,>=0.1.98" and we can see that pip keeps on retrying embedchain versions from 0.1.104 down to 0.1.98.

It's like there's a conflict between two of the deps at https://pypi.org/pypi/crewai/json / https://pypi.org/pypi/crewai/0.30.11/json

I suppose I could fork embedchain and create my own pypi.org entry for my fork and lower the requirements of chromadb that it requires but that's a lot of work for something that's very speculative.

@prescriptionlifeline
Copy link
Author

Installing an older version of crewAI worked. pip3 install crewai==0.22.5. The latest version of crewAI, however, is

0.22.5 was released on March 12. Latest version is 0.3.11, released on May 14.

@prescriptionlifeline
Copy link
Author

prescriptionlifeline commented May 30, 2024

I almost wonder if "graphlib-backport>=1.0.3; python_version < "3.9"" is the issue (from https://pypi.org/pypi/chromadb/json / https://pypi.org/pypi/chromadb/0.5.0/json).

Like if chromadb only works on Python 3.8.x and I'm running 0.12.x then that'd 'cause the problem.

I note that https://pypi.org/pypi/crewai/0.22.5/json doesn't require embedchain whereas https://pypi.org/pypi/crewai/0.30.11/json does.

https://pastebin.com/e3L8bGY4 is the pip3 install crewai==0.22.5 output. Note that chromadb doesn't show up in that at all.

As for chromadb... if I do pip3 install chromadb I get this as the output:

https://pastebin.com/c318cUDu

It's not able to install it but it keeps on retrying versions of chromadb all the way down to 0.3.23 (embedchain requires chromadb<0.5.0,>=0.4.17) and that one doesn't have "graphlib-backport>=1.0.3; python_version < "3.9"" in https://pypi.org/pypi/chromadb/0.3.23/json but it's also too old to work with embedchain (and the odds of their being BC breaks anyway are super high)

If I do pip3 install chromadb==0.5.0 I get this:

INFO: pip is looking at multiple versions of chromadb to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement onnxruntime>=1.14.1 (from chromadb) (from versions: none)
ERROR: No matching distribution found for onnxruntime>=1.14.1

full output

Here are the deps of that: https://pypi.org/pypi/onnxruntime/json

Note sure what's up with that. Here are the deps for that:

requires_dist: [
"coloredlogs",
"flatbuffers",
"numpy>=1.21.6",
"packaging",
"protobuf",
"sympy"
],
requires_python: null,

Doing pip3 install onnxruntime fails right off the bat:

ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)
ERROR: No matching distribution found for onnxruntime

onnxruntime is maintained by Microsoft fwiw 🤷‍♂️

@joaomdmoura
Copy link
Owner

hey folks, just flagging I'll be looking into this later today :) updating overall dependencies

@caitlinhudon
Copy link

I was able to get crewai installed using the advice from @prescriptionlifeline above to install an older version via pip3 install crewai==0.22.5. I'm running into the same error described above when trying to pip install 'crewai[tools]==0.22.5' to access the crewai tools.

Would love advice if anyone has run into this and solved for it!

@swimmingkiim
Copy link

In my case, downgrading the Python version to 3.10.14 solved this issue.

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

No branches or pull requests

5 participants