I tried:
pip install neo4j
But it can't find the module:
from neo4j import GraphDatabase
ModuleNotFoundError: No module named 'neo4j'
I tried:
pip install neo4j
But it can't find the module:
from neo4j import GraphDatabase
ModuleNotFoundError: No module named 'neo4j'
Thanks, is py2neo the preferred way to interact with neo4j in Python?
pip install neo4j
working for me. Check if pip has completed without any error and package is available in site-packages
.
import sys
sys.path
and py2neo is community driver
Thanks, the import works fine just using python, but it can't find the package in Jupyter Lab.
I've got the import to work in Jupyter Lab by installing jupyterlab in the same conda environment.
The documentation is not clear what to do next, e.g., how to connect to a database, how to create a new database using Cypher. Where can I find good examples?
Great..
Some examples: GitHub - neo4j-examples/movies-python-bolt: Neo4j Movies Example application with Flask backend using the neo4j-python-driver
GitHub - neo4j/neo4j-python-driver: Neo4j Bolt driver for Python
hello-world
and Manual: The Neo4j Drivers Manual v1.7 - Neo4j Driver Manual
https://neo4j.com/docs/api/python-driver/1.7/#
pip install py2neo
from py2neo import Graph
graph = Graph("bolt://localhost:7687", auth=("neo4j", "asdfgh123"))
uery = "MATCH (n) return n"
graph.run(query).data()
This would be the simplest way to connect and retrieve results. Add on queries to run to perform additional steps on your data.
Thanks, that does it!
The examples I found online just did:
graph = Graph()
and that obviously didn't work.
glad that i could of help