neo4j-contrib / py2neo

EOL! Py2neo is a comprehensive Neo4j driver library and toolkit for Python.
https://py2neo.org
Apache License 2.0
20 stars 8 forks source link

from py2neo import Graph, Node, Relationship #919

Closed maengrui closed 2 years ago

maengrui commented 3 years ago

from py2neo import Graph, Node, Relationship when i import Graph, i got a issue with from py2neo import Graph, Node, Relationship ImportError: cannot import name 'Graph' from partially initialized module 'py2neo' (most likely due to a circular import) and my python version =3.8.8 py2neo version=4.3.0, i also changed the verison of py2neo ,i meet the same issue.

motey commented 2 years ago
from py2neo import Graph, Node, Relationship

g = Graph()
n = Node()
r = Relationship(n)

This runs. Sorry, your issue is not reprodcuible.

Most likely you have a problem with a circular import. As your error message says :) This is a common mistake in python code. have a look here https://stackabuse.com/python-circular-imports/

You have to fix this in your code. this is not an issue with py2neo

maengrui commented 2 years ago

sorry i found why , i made a mistake because of bulit an new python module named py2neo .