Bug Description
我按照his instructions的步骤操作,但是无法导入'Neo4jGraphStore':
from llama_index.graph_stores.neo4j import Neo4jGraphStore
ImportError: cannot import name 'Neo4jGraphStore' from partially initialized module 'llama_index.graph_stores.neo4j' (most likely due to a circular import) (C:\Users\cpdft.conda\envsllamaindex\lib\site-packages\llama_index\graph_stores
eo4j_*init*_.py)
Version
0.10.55
Steps to Reproduce
from llama_index.core import KnowledgeGraphIndex, SimpleDirectoryReader
from llama_index.core import StorageContext
from llama_index.graph_stores.neo4j import Neo4jGraphStore
# initializing neo4j
graph_store = Neo4jGraphStore(
username=username,
password=password,
url=url,
database=database,
)
Relevant Logs/Tracbacks
from llama_index.core import KnowledgeGraphIndex, SimpleDirectoryReader
from llama_index.core import StorageContext
from llama_index.graph_stores.neo4j import Neo4jGraphStore
# initializing neo4j
graph_store = Neo4jGraphStore(
username=username,
password=password,
url=url,
database=database,
)
ImportError: cannot import name 'Neo4jGraphStore' from partially initialized module 'llama_index.graph_stores.neo4j' (most likely due to a circular import) (C:\Users\cpdft.conda\envs\llamaindex\lib\site-packagesllama_index\graph_stores
eo4j_init_.py)
2条答案
按热度按时间bcs8qyzn1#
你好!我在这里帮助你解决在等待人工维护者时遇到的任何错误、问题或贡献。
你遇到的错误是由于
llama_index
库中的循环导入问题导致的。这是一个已知的问题。要解决这个问题,你可以尝试以下步骤:neo4j
包:Neo4jGraphStore
,或者确保没有其他导入导致循环依赖。Neo4jGraphStore
的导入路径应该是:如果问题仍然存在,可能与
llama_index
库中已知的循环导入问题有关。不幸的是,在提供的上下文中没有提到特定于此问题的解决方法。你可能需要等待维护者的修复或检查库中是否有任何更新可以解决此问题 1(https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/discover_llamaindex/document_management/discord_dumps/help_channel_dump_06_02_23.json)。目前,请确保你的环境设置正确,并使用所需包的最新版本。
mtb9vblg2#
我认为llama-index或其他软件包版本之间存在不匹配。