Re: [Neo4j] neo4j python import error
On Thu, Sep 22, 2011 at 3:37 PM, Jacob Hansson-2 [via Neo4j Community Discussions] ml-node+s438527n3358782...@n3.nabble.com wrote: Update on this: I just pushed this to master, you will be able to follow the build via our build control panel. When the deploy Embedded Python project has run successfully, the updated version should be available on pypi for download. There is currently almost 200 builds queued up, so it may take a while.. http://builder.neo4j.org/project.html?projectId=project34tab=projectOverview (just click login as guest) Thanks for reporting this, it turned out to be a proper bug (using : instead of ; as classpath separators on windows). Let me know if the fix worked! /Jake I downloaded and installed the newest version, but I still got the same error, classpath was still incorrect. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ import neo4j Traceback (most recent call last): File pyshell#3, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 158, in module raise ImportError(Cannot find Neo4j java classes, used classpath: %s % classpath) ImportError: Cannot find Neo4j java classes, used classpath: .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ I then updated the classpath with a modified version of your code: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' os.environ['CLASSPATH']=';'.join(libpath+p for p in os.listdir(libpath)) print os.environ['CLASSPATH'] C:\Python27\Lib\site-packages\neo4j\javalib\antlr-2.7.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-analysis-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-commons-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-tree-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-util-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\blueprints-core-0.9.jar;C:\Python27\Lib\site-packages\neo4j\javalib\geronimo-jta_1.1_spec-1.1.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\gremlin-1.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\groovy-1.8.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jansi-1.5.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jettison-1.3.jar;C:\Python27\Lib\site-packages\neo4j\javalib\lucene-core-3.1.0.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-cypher-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\ne o4j\javalib\neo4j-graph-algo-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-graph-matching-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-jmx-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-kernel-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-lucene-index-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-udc-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\pipes-0.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\scala-library-2.9.0-1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\stax-api-1.0.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.py;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyc;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyo Now it complains about DLL's: import neo4j Traceback (most recent call last): File pyshell#10, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 113, 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.', RuntimeError('Unable to start JVM at src/native/common/jp_env.cpp:54',)) I'll keep you posted, at least the java path check works now. -- Dewald Pieterse A democracy is nothing more than mob rule, where fifty-one percent of the people take away the rights of the other forty-nine. ~ Thomas Jefferson http://www.jonathangullible.com/mmedia/PoL.English.The.Philosophy.of.Liberty.swf -- View this
Re: [Neo4j] neo4j python import error
For the DLL issues, see the windows section of the installation instructions, here: http://docs.neo4j.org/chunked/1.5-SNAPSHOT/python-embedded-installation.html Keep me posted! Jake On Fri, Sep 23, 2011 at 10:37 AM, bmeagle dewald.piete...@gmail.com wrote: On Thu, Sep 22, 2011 at 3:37 PM, Jacob Hansson-2 [via Neo4j Community Discussions] ml-node+s438527n3358782...@n3.nabble.com wrote: Update on this: I just pushed this to master, you will be able to follow the build via our build control panel. When the deploy Embedded Python project has run successfully, the updated version should be available on pypi for download. There is currently almost 200 builds queued up, so it may take a while.. http://builder.neo4j.org/project.html?projectId=project34tab=projectOverview (just click login as guest) Thanks for reporting this, it turned out to be a proper bug (using : instead of ; as classpath separators on windows). Let me know if the fix worked! /Jake I downloaded and installed the newest version, but I still got the same error, classpath was still incorrect. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ import neo4j Traceback (most recent call last): File pyshell#3, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 158, in module raise ImportError(Cannot find Neo4j java classes, used classpath: %s % classpath) ImportError: Cannot find Neo4j java classes, used classpath: .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ I then updated the classpath with a modified version of your code: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' os.environ['CLASSPATH']=';'.join(libpath+p for p in os.listdir(libpath)) print os.environ['CLASSPATH'] C:\Python27\Lib\site-packages\neo4j\javalib\antlr-2.7.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-analysis-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-commons-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-tree-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-util-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\blueprints-core-0.9.jar;C:\Python27\Lib\site-packages\neo4j\javalib\geronimo-jta_1.1_spec-1.1.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\gremlin-1.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\groovy-1.8.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jansi-1.5.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jettison-1.3.jar;C:\Python27\Lib\site-packages\neo4j\javalib\lucene-core-3.1.0.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-cypher-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\ ne o4j\javalib\neo4j-graph-algo-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-graph-matching-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-jmx-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-kernel-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-lucene-index-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-udc-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\pipes-0.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\scala-library-2.9.0-1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\stax-api-1.0.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.py;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyc;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyo Now it complains about DLL's: import neo4j Traceback (most recent call last): File pyshell#10, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 113, 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.', RuntimeError('Unable to start JVM at
Re: [Neo4j] neo4j python import error
I've sorted the DLL issues, now I can import neo4j along with my os.environ path additions. On Fri, Sep 23, 2011 at 10:55 AM, Jacob Hansson-2 [via Neo4j Community Discussions] ml-node+s438527n3361314...@n3.nabble.com wrote: For the DLL issues, see the windows section of the installation instructions, here: http://docs.neo4j.org/chunked/1.5-SNAPSHOT/python-embedded-installation.html Keep me posted! Jake On Fri, Sep 23, 2011 at 10:37 AM, bmeagle [hidden email]http://user/SendEmail.jtp?type=nodenode=3361314i=0 wrote: On Thu, Sep 22, 2011 at 3:37 PM, Jacob Hansson-2 [via Neo4j Community Discussions] [hidden email]http://user/SendEmail.jtp?type=nodenode=3361314i=1 wrote: Update on this: I just pushed this to master, you will be able to follow the build via our build control panel. When the deploy Embedded Python project has run successfully, the updated version should be available on pypi for download. There is currently almost 200 builds queued up, so it may take a while.. http://builder.neo4j.org/project.html?projectId=project34tab=projectOverview (just click login as guest) Thanks for reporting this, it turned out to be a proper bug (using : instead of ; as classpath separators on windows). Let me know if the fix worked! /Jake I downloaded and installed the newest version, but I still got the same error, classpath was still incorrect. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ import neo4j Traceback (most recent call last): File pyshell#3, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 158, in module raise ImportError(Cannot find Neo4j java classes, used classpath: %s % classpath) ImportError: Cannot find Neo4j java classes, used classpath: .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ I then updated the classpath with a modified version of your code: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' os.environ['CLASSPATH']=';'.join(libpath+p for p in os.listdir(libpath)) print os.environ['CLASSPATH'] C:\Python27\Lib\site-packages\neo4j\javalib\antlr-2.7.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-analysis-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-commons-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-tree-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-util-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\blueprints-core-0.9.jar;C:\Python27\Lib\site-packages\neo4j\javalib\geronimo-jta_1.1_spec-1.1.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\gremlin-1.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\groovy-1.8.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jansi-1.5.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jettison-1.3.jar;C:\Python27\Lib\site-packages\neo4j\javalib\lucene-core-3.1.0.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-cypher-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\ ne o4j\javalib\neo4j-graph-algo-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-graph-matching-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-jmx-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-kernel-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-lucene-index-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-udc-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\pipes-0.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\scala-library-2.9.0-1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\stax-api-1.0.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.py;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyc;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyo Now it complains about DLL's: import neo4j Traceback (most recent call last): File pyshell#10, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 113, in module raise Exception(Unable to start JVM, even though I found the JVM path. If you are using windows, this may be due
Re: [Neo4j] neo4j python import error
Great :) If you run into any other problems, or have ideas for improvements, please feel free to post them here on the mailing list, or to create issues with the project bug tracker: https://github.com/neo4j/python-embedded/issues /Jake On Fri, Sep 23, 2011 at 10:57 AM, bmeagle dewald.piete...@gmail.com wrote: I've sorted the DLL issues, now I can import neo4j along with my os.environ path additions. On Fri, Sep 23, 2011 at 10:55 AM, Jacob Hansson-2 [via Neo4j Community Discussions] ml-node+s438527n3361314...@n3.nabble.com wrote: For the DLL issues, see the windows section of the installation instructions, here: http://docs.neo4j.org/chunked/1.5-SNAPSHOT/python-embedded-installation.html Keep me posted! Jake On Fri, Sep 23, 2011 at 10:37 AM, bmeagle [hidden email] http://user/SendEmail.jtp?type=nodenode=3361314i=0 wrote: On Thu, Sep 22, 2011 at 3:37 PM, Jacob Hansson-2 [via Neo4j Community Discussions] [hidden email] http://user/SendEmail.jtp?type=nodenode=3361314i=1 wrote: Update on this: I just pushed this to master, you will be able to follow the build via our build control panel. When the deploy Embedded Python project has run successfully, the updated version should be available on pypi for download. There is currently almost 200 builds queued up, so it may take a while.. http://builder.neo4j.org/project.html?projectId=project34tab=projectOverview (just click login as guest) Thanks for reporting this, it turned out to be a proper bug (using : instead of ; as classpath separators on windows). Let me know if the fix worked! /Jake I downloaded and installed the newest version, but I still got the same error, classpath was still incorrect. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ import neo4j Traceback (most recent call last): File pyshell#3, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 19, in module from _backend import * File C:\Python27\lib\site-packages\neo4j\_backend.py, line 158, in module raise ImportError(Cannot find Neo4j java classes, used classpath: %s % classpath) ImportError: Cannot find Neo4j java classes, used classpath: .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ I then updated the classpath with a modified version of your code: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' os.environ['CLASSPATH']=';'.join(libpath+p for p in os.listdir(libpath)) print os.environ['CLASSPATH'] C:\Python27\Lib\site-packages\neo4j\javalib\antlr-2.7.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-analysis-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-commons-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-tree-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\asm-util-3.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\blueprints-core-0.9.jar;C:\Python27\Lib\site-packages\neo4j\javalib\geronimo-jta_1.1_spec-1.1.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\gremlin-1.2.jar;C:\Python27\Lib\site-packages\neo4j\javalib\groovy-1.8.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jansi-1.5.jar;C:\Python27\Lib\site-packages\neo4j\javalib\jettison-1.3.jar;C:\Python27\Lib\site-packages\neo4j\javalib\lucene-core-3.1.0.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-cypher-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\ ne o4j\javalib\neo4j-graph-algo-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-graph-matching-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-jmx-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-kernel-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-lucene-index-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\neo4j-udc-1.5-SNAPSHOT.jar;C:\Python27\Lib\site-packages\neo4j\javalib\pipes-0.7.jar;C:\Python27\Lib\site-packages\neo4j\javalib\scala-library-2.9.0-1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\stax-api-1.0.1.jar;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.py;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyc;C:\Python27\Lib\site-packages\neo4j\javalib\__init__.pyo Now it complains about DLL's: import neo4j Traceback (most recent call last): File pyshell#10, line 1, in module import neo4j File
[Neo4j] neo4j python import error
Hi all, Decided to give neo4j via python a try but alas: from neo4j import GraphDatabase Traceback (most recent call last): File lt;pyshell#1gt;, line 1, in module from neo4j import GraphDatabase File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage I am using winxp I installed neo4j-embedded-1.5.dev104.win32.exe and I am using python 2.7 Regards bmeagle -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358482.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j python import error
Hmm, I think the error you are getting is the result of neo4j-embedded not finding java jars that it needs (I'll add it to the backlog to add an explicit check for that, rather than failing like this). Normally, neo4j-embedded will set its classpath itself, pointing to the java jars it comes bundled with. However, it is possible to override this, by setting the environment variable CLASSPATH to some value. Could you check if this is the case? If not, please let me know what platform you are running, and what version of neo4j-embedded you have installed, and I'll dig deeper into it. Oh, and I'll make a note that the environment var needs to be changed to something more specific. /Jake On Thu, Sep 22, 2011 at 1:46 PM, bmeagle dewald.piete...@gmail.com wrote: Hi all, Decided to give neo4j via python a try but alas: from neo4j import GraphDatabase Traceback (most recent call last): File lt;pyshell#1gt;, line 1, in module from neo4j import GraphDatabase File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage I am using winxp I installed neo4j-embedded-1.5.dev104.win32.exe and I am using python 2.7 Regards bmeagle -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358482.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j python import error
I tried adding C:\Python27\Lib\site-packages\neo4j\javalib to sys.path but that didn't work, see below. I am running python 2.7 on win xp I installed neo4j-embedded-1.5.dev104.win32.exe import neo4j Traceback (most recent call last): File lt;pyshell#0gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage import sys print sys.path ['C:\\Python27\\Lib\\idlelib', 'C:\\Python27\\lib\\site-packages\\zodb3-3.10.3-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.interface-3.8.0-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.event-3.5.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zdaemon-2.0.4-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zconfig-2.9.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zc.lockfile-1.0.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\transaction-1.1.1-py2.7.egg', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin'] sys.path.append('C:\Python27\Lib\site-packages\neo4j\javalib') print sys.path ['C:\\Python27\\Lib\\idlelib', 'C:\\Python27\\lib\\site-packages\\zodb3-3.10.3-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.interface-3.8.0-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.event-3.5.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zdaemon-2.0.4-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zconfig-2.9.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zc.lockfile-1.0.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\transaction-1.1.1-py2.7.egg', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib'] sys.path.append('C:\\Python27\\Lib\\site-packages\\neo4j\\javalib') import neo4j Traceback (most recent call last): File lt;pyshell#8gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage Jacob Hansson-2 wrote: Hmm, I think the error you are getting is the result of neo4j-embedded not finding java jars that it needs (I'll add it to the backlog to add an explicit check for that, rather than failing like this). Normally, neo4j-embedded will set its classpath itself, pointing to the java jars it comes bundled with. However, it is possible to override this, by setting the environment variable CLASSPATH to some value. Could you check if this is the case? If not, please let me know what platform you are running, and what version of neo4j-embedded you have installed, and I'll dig deeper into it. Oh, and I'll make a note that the environment var needs to be changed to something more specific. /Jake On Thu, Sep 22, 2011 at 1:46 PM, bmeagle lt;dewald.piete...@gmail.comgt; wrote: Hi all, Decided to give neo4j via python a try but alas: from neo4j import GraphDatabase Traceback (most recent call last): File lt;pyshell#1gt;, line 1, in module from neo4j import GraphDatabase File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File
Re: [Neo4j] neo4j python import error
No, the sys.path thing won't work, JPype doesn't pull it's java libs off of sys.path (unfortunately). Instead, it needs an explicit java classpath passed to it when it gets instantiated. Neo4j-embedded sets that classpath either on it's own (which may be broken on windows, I'm investigating that now), or using the value of the CLASSPATH environment variable. You could try setting the CLASSPATH environment var before you import neo4j: import os libpath = 'path/to/neo4j/javalib' os.environ['CLASSPATH'] = ';'.join( [ os.path.abspath(p) for p in os.listdir(libpath)]) from neo4j import GraphDatabase /Jake On Thu, Sep 22, 2011 at 2:45 PM, bmeagle dewald.piete...@gmail.com wrote: I tried adding C:\Python27\Lib\site-packages\neo4j\javalib to sys.path but that didn't work, see below. I am running python 2.7 on win xp I installed neo4j-embedded-1.5.dev104.win32.exe import neo4j Traceback (most recent call last): File lt;pyshell#0gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage import sys print sys.path ['C:\\Python27\\Lib\\idlelib', 'C:\\Python27\\lib\\site-packages\\zodb3-3.10.3-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.interface-3.8.0-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.event-3.5.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zdaemon-2.0.4-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zconfig-2.9.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zc.lockfile-1.0.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\transaction-1.1.1-py2.7.egg', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin'] sys.path.append('C:\Python27\Lib\site-packages\neo4j\javalib') print sys.path ['C:\\Python27\\Lib\\idlelib', 'C:\\Python27\\lib\\site-packages\\zodb3-3.10.3-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.interface-3.8.0-py2.7-win32.egg', 'C:\\Python27\\lib\\site-packages\\zope.event-3.5.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zdaemon-2.0.4-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zconfig-2.9.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\zc.lockfile-1.0.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\transaction-1.1.1-py2.7.egg', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\PIL', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib'] sys.path.append('C:\\Python27\\Lib\\site-packages\\neo4j\\javalib') import neo4j Traceback (most recent call last): File lt;pyshell#8gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage Jacob Hansson-2 wrote: Hmm, I think the error you are getting is the result of neo4j-embedded not finding java jars that it needs (I'll add it to the backlog to add an explicit check for that, rather than failing like this). Normally, neo4j-embedded will set its classpath itself, pointing to the java jars it comes bundled with. However, it is possible to override this, by setting the environment variable CLASSPATH to some value. Could you check if this is the case? If not, please let me know what platform you are running, and what version of neo4j-embedded you have installed, and I'll dig
Re: [Neo4j] neo4j python import error
I manually added the path to the CLASSPATH windows environment variable via system settings. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ checked it: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' print os.listdir(libpath) ['geronimo-jta_1.1_spec-1.1.1.jar', 'lucene-core-3.1.0.jar', 'neo4j-1.5-SNAPSHOT.jar', 'neo4j-cypher-1.5-SNAPSHOT.jar', 'neo4j-graph-algo-1.5-SNAPSHOT.jar', 'neo4j-graph-matching-1.5-SNAPSHOT.jar', 'neo4j-jmx-1.5-SNAPSHOT.jar', 'neo4j-kernel-1.5-SNAPSHOT.jar', 'neo4j-lucene-index-1.5-SNAPSHOT.jar', 'neo4j-udc-1.5-SNAPSHOT.jar', 'scala-library-2.9.0-1.jar', '__init__.py', '__init__.pyc', '__init__.pyo'] but still no joy import neo4j Traceback (most recent call last): File lt;pyshell#15gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage Couldn't this be something else? bmeagle -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358708.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j python import error
On Thu, Sep 22, 2011 at 3:16 PM, bmeagle dewald.piete...@gmail.com wrote: I manually added the path to the CLASSPATH windows environment variable via system settings. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ checked it: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' print os.listdir(libpath) ['geronimo-jta_1.1_spec-1.1.1.jar', 'lucene-core-3.1.0.jar', 'neo4j-1.5-SNAPSHOT.jar', 'neo4j-cypher-1.5-SNAPSHOT.jar', 'neo4j-graph-algo-1.5-SNAPSHOT.jar', 'neo4j-graph-matching-1.5-SNAPSHOT.jar', 'neo4j-jmx-1.5-SNAPSHOT.jar', 'neo4j-kernel-1.5-SNAPSHOT.jar', 'neo4j-lucene-index-1.5-SNAPSHOT.jar', 'neo4j-udc-1.5-SNAPSHOT.jar', 'scala-library-2.9.0-1.jar', '__init__.py', '__init__.pyc', '__init__.pyo'] but still no joy import neo4j Traceback (most recent call last): File lt;pyshell#15gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage Couldn't this be something else? Well, yeah, but I think this is it. I was able to replicate your problem on a local xp machine (and have a fix that seems to work, running the test suite on it right now). It should be available for download in two hours or so, depending on how our build servers are feeling today. Until then, the problem with the classpath you sent above is that it just points to the folder with the jars. The classpath needs to explicitly list the path to each jar, separated by semicolons. The code I sent in my previous mail should do that automatically for you, if you just give it the correct javalib folder path. bmeagle -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358708.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j python import error
Update on this: I just pushed this to master, you will be able to follow the build via our build control panel. When the deploy Embedded Python project has run successfully, the updated version should be available on pypi for download. There is currently almost 200 builds queued up, so it may take a while.. http://builder.neo4j.org/project.html?projectId=project34tab=projectOverview (just click login as guest) Thanks for reporting this, it turned out to be a proper bug (using : instead of ; as classpath separators on windows). Let me know if the fix worked! /Jake On Thu, Sep 22, 2011 at 3:20 PM, Jacob Hansson jacob.hans...@neotechnology.com wrote: On Thu, Sep 22, 2011 at 3:16 PM, bmeagle dewald.piete...@gmail.comwrote: I manually added the path to the CLASSPATH windows environment variable via system settings. print os.environ['CLASSPATH'] .;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:\Python27\Lib\site-packages\neo4j\javalib\ checked it: libpath = 'C:\\Python27\\Lib\\site-packages\\neo4j\\javalib\\' print os.listdir(libpath) ['geronimo-jta_1.1_spec-1.1.1.jar', 'lucene-core-3.1.0.jar', 'neo4j-1.5-SNAPSHOT.jar', 'neo4j-cypher-1.5-SNAPSHOT.jar', 'neo4j-graph-algo-1.5-SNAPSHOT.jar', 'neo4j-graph-matching-1.5-SNAPSHOT.jar', 'neo4j-jmx-1.5-SNAPSHOT.jar', 'neo4j-kernel-1.5-SNAPSHOT.jar', 'neo4j-lucene-index-1.5-SNAPSHOT.jar', 'neo4j-udc-1.5-SNAPSHOT.jar', 'scala-library-2.9.0-1.jar', '__init__.py', '__init__.pyc', '__init__.pyo'] but still no joy import neo4j Traceback (most recent call last): File lt;pyshell#15gt;, line 1, in module import neo4j File C:\Python27\lib\site-packages\neo4j\__init__.py, line 29, in module from neo4j.core import GraphDatabase, Direction, NotFoundException, BOTH, ANY, INCOMING, OUTGOING File C:\Python27\lib\site-packages\neo4j\core.py, line 27, in module GraphDatabase = extends(GraphDatabaseService) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 43, in extends return ParentClass(getattr(CLASS,'__name__','Class'),(),{}) File C:\Python27\lib\site-packages\neo4j\_backend.py, line 34, in __new__ return type.__new__(Class, name, (object,), body) TypeError: type() argument 1 must be string, not JPackage Couldn't this be something else? Well, yeah, but I think this is it. I was able to replicate your problem on a local xp machine (and have a fix that seems to work, running the test suite on it right now). It should be available for download in two hours or so, depending on how our build servers are feeling today. Until then, the problem with the classpath you sent above is that it just points to the folder with the jars. The classpath needs to explicitly list the path to each jar, separated by semicolons. The code I sent in my previous mail should do that automatically for you, if you just give it the correct javalib folder path. bmeagle -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/neo4j-python-import-error-tp3358482p3358708.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user