gusye1234 / nano-graphrag

A simple, easy-to-hack GraphRAG implementation
MIT License
1.7k stars 164 forks source link

pip install need patch, example fails #43

Closed phiweger closed 2 months ago

phiweger commented 2 months ago

Installed this (great!) library via pip. But then on running the example:

from nano_graphrag import GraphRAG, QueryParam

graph_func = GraphRAG(working_dir="./dickens")

with open("./book.txt") as f:
    graph_func.insert(f.read())

I get the following error:

      1 from __future__ import division
      3 from builtins import str, range, object
----> 4 from past.utils import old_div
      6 import autograd.numpy as np
      7 from ._utils import outer_rows

ModuleNotFoundError: No module named 'past'

Seems an issue with graspologic:

https://github.com/microsoft/graphrag/pull/1033/commits/5135baeffb4cd104f8381f9d380eac659aa0e1ac

pip install future=1.0.0 solves this.