RAG执行代码报错 “no module named ‘llama_index.vector_stores‘“

RAG执行代码报错 “no module named ‘llama_index.vector_stores’”

一、问题
import chromadb
from llama_index.core import VectorStoreIndex, StorageContext, Settings
from llama_index.core.schema import TextNode
from llama_index.llms.huggingface import HuggingFaceLLM
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
#  pip install chromadb llama-index llama-index-vector-stores-chroma
from llama_index.vector_stores.chroma import ChromaVectorStore
from llama_index.core import PromptTemplate
...

RAG执行代码报错 “no module named ‘llama_index.vector_stores’”
已经安装了chromadb,llama_index,查看llama_index包,确实没有vector_stores对应目录

二、问题解决

需要额外安装llama-index-vector-stores-chroma

pip install chromadb llama-index llama-index-vector-stores-chroma

重新执行代码正常。



你可能感兴趣的:(RAG执行代码报错 “no module named ‘llama_index.vector_stores‘“)