Wrong Memgraph import in mem0/memory/memgraph_memory.py
🐛 Describe the bug
When trying to setup mem0 with Memgraph i stumbled upon this issue:
langchain_memgraph is not installed. Please install it using pip install langchain-memgraph
I tracked this down to mem0/memory/memgraph_memory.py
try:
from langchain_memgraph import Memgraph
except ImportError:
raise ImportError(
"langchain_memgraph is not installed. Please install it using pip install langchain-memgraph"
)
The import is wrong according to the docs https://python.langchain.com/docs/integrations/graphs/memgraph/
correct would be
from langchain_memgraph.graphs.memgraph import Memgraph
Also I noticed in 7117a94fbf5013f0414c550f64df436afcc6479d there was the dependency for langchain_memgraph removed.
temporary fix: use 0.1.1 version
temporary fix: use 0.1.1 version
This leads to dependency conflicts with other packages
any update on this?
Got this issue as well.
ImportError: cannot import name 'Memgraph' from 'langchain_memgraph' (crewai_play/venv/lib/python3.11/site-packages/langchain_memgraph/__init__.py)
Closing as it's fixed.