简体   繁体   English

py2neo无法运行GraphServer

[英]py2neo Can't run GraphServer

I've problems using the server from the py2neo package. 我在使用py2neo软件包中的服务器时遇到问题。

Here is what I try: 这是我尝试的方法:

from py2neo.server import GraphServer
server = GraphServer()

This leads to the following exception: 这导致以下异常:

FileNotFoundError: [Errno 2] No such file or directory: '.\\conf\\neo4j-server.properties'

So I looked up the installation: 所以我查看了安装:

server = GraphServer("C:\Program Files (x86)\\Neo4j Community\\bin")

where I get the same Exception: 我得到同样的异常:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Neo4j Community\\bin\\conf\\neo4j-server.properties'

I looked where the neo4j-server.properties is. 我看了一下neo4j-server.properties在哪里。 It's in C:/Users/Me/AppData/Roaming/Neo4j_Community/ but if I use that, it's not working either... 它在C:/ Users / Me / AppData / Roaming / Neo4j_Community /中,但是如果我使用它,那么它也不起作用...

py2neo version: 2.0.7. py2neo版本:2.0.7。 neo4j version 2.2.1 Python 3.4 Windows 10. neo4j版本2.2.1 Python 3.4 Windows 10。

I figure there must be something wrong with the path, but I didn't found anything to fix that. 我认为路径一定有问题,但是我没有找到任何解决方法。

What I'm trying to achieve: I want a function that shuts down the server if it is running and start a new process with a database that I use only for testing (and end the server and restart the old Graph after running the tests). 我要实现的目标:我需要一个函数来关闭服务器(如果正在运行)并使用仅用于测试的数据库启动新进程(并在运行测试后结束服务器并重新启动旧Graph) 。 Until now I do that manualy... 到现在为止,我还是手动进行...

Thanks a lot 非常感谢

As mentioned on the server page in the docs, this module is built on Linux and will likely only work there. 如文档中服务器页面所述,此模块基于Linux构建,可能仅在Linux上有效。 I don't support this functionality under Windows. 我在Windows下不支持此功能。

http://py2neo.org/2.0/server.html http://py2neo.org/2.0/server.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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