1

I'm trying to import and use chromadb to play as a vector store for my RAG application. But it is giving ImportError as it is trying to import pypika packages in the backend which I cannot control manually.

My code:

!pip install chromadb
import chromadb
chroma_client = chromadb.Client()

Below is the error thrown:

ImportError: cannot import name 'ClickHouseQuery' from 'pypika.dialects' 
(C:\Users\Lenovo\AppData\Roaming\Python\Python311\site-packages\pypika\dialects\__init__.py)

I'm working on vscode with virtual env in E: drive. How can we handle this? is there any prerequisite to be done before importing chromadb to get rid of this pypika ImportError?

1 Answer 1

0

I've had the same problem, for me turns out it had to do with package incompatibilities (Python <3) which in turn had to do with the Python version. This thread mentioned a similar issue.

The solution was downgrading Python to 3.10. So if you're using e.g. a Conda environment, you can use conda install python=3.10. That ended up working for me, hope it helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.