Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-24-2020 01:08 PM
Hi everyone.
I'm on Mac OS X 10.15.4
I'm attempting to connect to my graph database using the python driver. I'm using Python 3.7.7 in a virtual environment with the following packages installed with pip.
Pip freeze output:
cycler==0.10.0
decorator==4.4.2
graphrole==1.0.0
kiwisolver==1.2.0
matplotlib==3.2.1
neo4j==1.7.6
neo4j-driver==1.7.6
neobolt==1.7.17
neotime==1.7.4
networkx==2.2
numpy==1.15.3
pandas==0.23.4
pprint==0.1
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2019.3
scikit-learn==0.20.2
scipy==1.1.0
seaborn==0.10.0
six==1.14.0
Neo4j version 3.5.14, Desktop verision 1.2.7.
Drivers were installed using pip.
As you can see it works from the python shell but not when running a .py file that imports it. It's also inconsistent when importing in the shell as many times I would get the same error. I've tried both neo4j and neo4j-driver separately and together and neither has worked.
Any suggestions?
04-24-2020 01:56 PM
Update:
I've also downloaded the drivers and installed them with
python setup.py install
Script still won't work, but it works from the shell.
08-12-2020 04:40 AM
You have to rename the file, because from neo4j import GraphDatabase
tries to find in the local file first and not in the package, hence this error.
10-02-2021 06:29 AM
Sorry, I don't understand your reply. Which file to rename?
10-19-2021 06:56 AM
Hi Edcherednik,
Can you check if there is a file in your python project named 'neo4j.py'?
If so, that's the one you need to rename.
All the sessions of the conference are now available online