microsoft / graphrag

A modular graph-based Retrieval-Augmented Generation (RAG) system
https://microsoft.github.io/graphrag/
MIT License
20.11k stars 1.97k forks source link

[Issue]: graphrag.index module not found #465

Closed satyaprakash1729 closed 4 months ago

satyaprakash1729 commented 4 months ago

Describe the issue

I'm following the documentation specified at https://microsoft.github.io/graphrag/posts/get_started/ I'm getting below error when I try to run python -m graphrag.index --init --root ./ragtest

/home//.pyenv/versions/3.9.14/bin/python: No module named graphrag.index

I'm using Ubuntu

Steps to reproduce

No response

GraphRAG Config Used

No response

Logs and screenshots

No response

Additional Information

AlonsoGuevara commented 4 months ago

Hi @satyaprakash1729 To use GraphRAG the minimmal Python version is 3.10. Please upgrade your python version and retry :)

minfawang commented 4 months ago

I'm using 3.10.13 and getting the same error:

$ python -m graphrag.index --init --root ./ragtest
/$ROOT/.venv/bin/python: No module named graphrag.index
minfawang commented 4 months ago

Ok found the workaround. When I'm using pipenv, somehow by default it is trying to install graphrag@0.0.0, which is empty. I had to fix the graphrag version:

# Wrong: will install 0.0.0
pipenv install graphrag

# Ok
pipenv install graphrag==0.1.1
AlonsoGuevara commented 4 months ago

Interesting... I'll double check pypi! Thanks for updating!

zongzi531 commented 4 months ago

I'm still No module named graphrag.index , Anyone knows how to fix this ?

Versions:

Python 3.12.4
graphrag 0.2.0
zongzi531 commented 4 months ago

I'm still No module named graphrag.index , Anyone knows how to fix this ?

Versions:

Python 3.12.4
graphrag 0.2.0

I found the problem. I use conda envs , but I used global pip installed graphrag, so python -m pip install <package> can solved.