gpythomas / llamaindex_rag

This is a RAG chatbot built with llamaindex, with an OpenAI compative API written in Flask.
3 stars 0 forks source link

chromadb==0.4.24 incompatible with latest NumPy #1

Open gavmor opened 2 weeks ago

gavmor commented 2 weeks ago

Got this error running create_db.py the first time. It's a known issue in chroma-core for which chroma have "made a deliberate choice of pinning the version of numpy we use to <2.0 in the latest Chroma release (0.5.3)."

Traceback (most recent call last):
  File "/home/user/workspace/other/llamaindex_rag/create_db.py", line 11, in <module>
    import chromadb
  File "/home/user/workspace/other/llamaindex_rag/venv/lib/python3.11/site-packages/chromadb/__init__.py", line 3, in <module>
    from chromadb.api.client import Client as ClientCreator
  File "/home/user/workspace/other/llamaindex_rag/venv/lib/python3.11/site-packages/chromadb/api/__init__.py", line 7, in <module>
    from chromadb.api.models.Collection import Collection
  File "/home/user/workspace/other/llamaindex_rag/venv/lib/python3.11/site-packages/chromadb/api/models/Collection.py", line 7, in <module>
    import chromadb.utils.embedding_functions as ef
  File "/home/user/workspace/other/llamaindex_rag/venv/lib/python3.11/site-packages/chromadb/utils/embedding_functions.py", line 7, in <module>
    from chromadb.api.types import (
  File "/home/user/workspace/other/llamaindex_rag/venv/lib/python3.11/site-packages/chromadb/api/types.py", line 102, in <module>
    ImageDType = Union[np.uint, np.int_, np.float_]
                                         ^^^^^^^^^
  File "/home/user/workspace/other/llamaindex_rag/venv/lib/python3.11/site-packages/numpy/__init__.py", line 400, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.
gpythomas commented 2 weeks ago

I generated a cleaner requirements.txt file with PDM, it should take care of dependencies issues, let me know if you still have issues.