Find answers from the community

Updated 6 months ago

Llama index import

At a glance

The community member is having trouble loading the llama_index module in Python 3.11 using PyCharm. They have installed the required packages (llama_index and langchain) but the module is not being recognized. The community members suggest that the issue might be due to a file or directory with the same name as the module, and recommend renaming it. After renaming the llama_index directory under site-packages, the community member was able to get the module recognized, but still couldn't get GPTSimplevectorindex to work. The community members then suggest using GPTVectorStoreIndex or VectorStoreIndex instead, as the names have been recently changed.

Hi am i missing something here? I cannot seem to load the llama_index module? I am pretty new to python so im sure im missing something. I did the pip install llama_index and pip install langchain. I am using pycharm as my IDE (normally i can just import the plugin but it doesnt recognize it). I am using python 3.11.
L
B
10 comments
Do you have a file or directory called "llama_index" ? If so, try renaming that first
Not that i am aware of. When you pip install does it create one?
Ok i did find one under site-packages
Lemme try renaming it
is what i have, renamed from llama_index to llama_indexer
Attachment
image.png
So i manually moved the directories to my venv and now it does show llama_index as being recongized. Still cant get GPTSimplevectorindex tho.
Attachment
image.png
Looks like it was renamed i guess
Yea that's a very old name πŸ˜…
GPTVectorStoreIndex or VectorStoreIndex should work
recently removed all the GPT prefixes (but also kept the old names for compat)
Add a reply
Sign up and join the conversation on Discord