Closed lishaozheng closed 3 months ago
Unmark the graph/index directory as sources root. The typing.py is confict with the python built in typing module.
This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.
This issue has been closed after being marked as stale for five days. Please reopen if needed.
Describe the issue
ImportError: Unable to import required dependencies: numpy: cannot import name 'NamedTuple' from partially initialized module 'typing' (most likely due to a circular import) (G:\LiProbject\project\graphrag\graphrag\index\typing.py)
Steps to reproduce
Copyright (c) 2024 Microsoft Corporation.
Licensed under the MIT License
"""The Indexing Engine package root."""
import argparse
from graphrag.index.cli import index_cli
from .cli import index_cli
if name == "main": parser = argparse.ArgumentParser()
Add the same arguments as shown in your provided code snippet
GraphRAG Config Used
No response
Logs and screenshots
Traceback (most recent call last): File "G:\LiProbject\project\graphrag\graphrag\index__main__.py", line 8, in
from graphrag.index.cli import index_cli
File "G:\LiProbject\project\graphrag\graphrag\index__init.py", line 6, in
from .cache import PipelineCache
File "G:\LiProbject\project\graphrag\graphrag\index\cache\ init.py", line 6, in
from .json_pipeline_cache import JsonPipelineCache
File "G:\LiProbject\project\graphrag\graphrag\index\cache\json_pipeline_cache.py", line 7, in
from typing import Any
File "G:\LiProbject\project\graphrag\graphrag\index\typing.py", line 9, in
import pandas as pd
File "I:\ProgramData\anaconda3\envs\grag\lib\site-packages\pandas\ init__.py", line 32, in
raise ImportError(
ImportError: Unable to import required dependencies:
numpy: cannot import name 'NamedTuple' from partially initialized module 'typing' (most likely due to a circular import) (G:\LiProbject\project\graphrag\graphrag\index\typing.py)
Additional Information