Find answers from the community

Updated 7 months ago

Hi

At a glance

The community member is experiencing a circular import error when trying to import the PGVectorStore from the llama_index.vector_stores.postgres module. Other community members suggest trying a fresh virtual environment and installing the necessary packages, such as llama-index-vector-stores-postgres and llama-index. One community member also mentions that the issue works fine in Google Colab, and shares a link to a Colab notebook. However, there is no explicitly marked answer in the comments.

Useful resources
Hi
I am trying to imoprt the PGVectorStore and getting the the circular import error

from llama_index.vector_stores.postgres import PGVectorStore

ERROR
ImportError: cannot import name 'PGVectorStore' from partially initialized module 'llama_index.vector_stores.postgres' (most likely due to a circular import)

Can anyone help me with this?
L
B
5 comments
Works fine for me in a fresh install

Maybe try with a fresh venv?
I tried by curating new environment
used these two commands

  • pip install llama-index-vector-stores-postgres
  • pip install llama-index
Thank you for sharing, let me check it.
Add a reply
Sign up and join the conversation on Discord