简体   繁体   中英

python neo4j jvm error

I am trying to setup neo4j in python 2.7 but have come across an alarming error. I am fairly new to neo4j and python as well as Ubuntu and would really appreciate some help

This is the error that I get

>>> import neo4j

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import neo4j
  File "/usr/local/lib/python2.7/dist-packages/neo4j/__init__.py", line 29, in <module>
    from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING
  File "/usr/local/lib/python2.7/dist-packages/neo4j/core.py", line 19, in <module>
    from _backend import *
  File "/usr/local/lib/python2.7/dist-packages/neo4j/_backend.py", line 135, in <module>
    raise Exception("Unable to start JVM, even though I found the JVM path. If you are using windows, this may be due to missing system DLL files, please see the windows installation instructions in the neo4j documentation.",e)
Exception: ('Unable to start JVM, even though I found the JVM path. If you are using windows, this may be due to missing system DLL files, please see the windows installation instructions in the neo4j documentation.', TypeError("unsupported operand type(s) for +: 'NoneType' and 'str'",))

I have installed Java 6 Oracle as-well as jpype and as I have said before I am using ubuntu 12.10? Should i set the JAVA_HOME and if so how, if not what other suggestions could someone make?

It looks like JPype cannot find your Java runtime. You can find out from where you are running Java by using:

readlink -e `which java`

This should give you something like:

/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

You can then use the path from this to set the JAVA_HOME environment variable:

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre

Hope this helps

Nige

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM