我在py2neo包中使用服务器时出现问题。
以下是我的尝试:
from py2neo.server import GraphServer
server = GraphServer()
这会导致以下异常:
FileNotFoundError: [Errno 2] No such file or directory: '.\\conf\\neo4j-server.properties'
所以我查看了安装:
server = GraphServer("C:\Program Files (x86)\\Neo4j Community\\bin")
我得到相同的例外:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Neo4j Community\\bin\\conf\\neo4j-server.properties'
我查看了neo4j-server.properties的位置。它位于C:/ Users / Me / AppData / Roaming / Neo4j_Community /但是如果我使用它,它也不起作用......
py2neo版本:2.0.7。 neo4j版本2.2.1 Python 3.4 Windows 10。
我认为路径一定有问题,但我没有找到任何解决方法。
我想要实现的目标:我想要一个关闭服务器的函数,如果它正在运行并使用我仅用于测试的数据库启动一个新进程(并在运行后结束服务器并重新启动旧的Graph)测试)。到现在为止我这样做了......
非常感谢
答案 0 :(得分:0)
正如文档中的服务器页面所提到的,这个模块是在Linux上构建的,可能只在那里工作。我在Windows下不支持此功能。