When running Neo4j Python Bolt Driver Example, error:"ImportError: No module named '_backend'"
<p>I am trying to switch over from Py2Neo to the new Neo4j <a href="https://neo4j.com/docs/developer-manual/current/drivers/" rel="nofollow">Bolt Driver</a>. After installing neo4j-driver v1.0.2 and I run the example code found on their <a href="https://github.com/neo4j/neo4j-python-driver" rel="nofollow">Github ReadMe page</a>:</p>

<pre><code>from neo4j.v1 import GraphDatabase, basic_auth
driver = GraphDatabase.driver("bolt://localhost", auth=basic_auth("neo4j", "neo4j"))
session = driver.session()
session.run("CREATE (a:Person {name:'Bob'})")
result = session.run("MATCH (a:Person) RETURN a.name AS name")
for record in result:
    print(record["name"])
session.close()
</code></pre>

<p>In response, I get the following error:</p>

<pre><code>Traceback (most recent call last):
  File "C:/PythonApps/Neo4jBoltDriverTest/run.py", line 1, in &lt;module&gt;
    from neo4j.v1 import GraphDatabase, basic_auth
  File "C:\Users\username\AppData\Local\Programs\Python\Python35\lib\site-packages\neo4j\__init__.py", line 29, in &lt;module&gt;
    from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING
  File "C:\Users\username\AppData\Local\Programs\Python\Python35\lib\site-packages\neo4j\core.py", line 19, in &lt;module&gt;
    from _backend import *
ImportError: No module named '_backend'
</code></pre>

<p>I have never seen an error with '_backend' before and it doesn't seem to be a library I can install. Any ideas what is causing this error?</p>

<p>For more context, I am using Python 3.5 and have installed neo4j-driver v1.0.2. Looks like neo4j-driver only works up to Python 3.4, is that correct?</p>

<p>Just wanted to follow up with the answer so that it might benefit others coming across this in the future.</p>

<p>With Nigel Small's help, I realized that I was not calling the correct package.  I believe this is another python package on my system from previous work named neo4j which my PyCharm IDE was calling to rather than neo4j-driver. </p>

<p>Bottom line, this problem was my fault due to poor package management.  Nothing wrong with the library's source. Moral of the story is that VirtualEnv is your friend and you should use it for every new project. </p>

python neo4j