我是 neo4j 的新手,当我编写此代码时出现以下错误:
>>> from py2neo import neo4j
>>> graph_DB = neo4j.GraphDatabaseService ("http://localhost:7474/db/data")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
graph_DB = neo4j.GraphDatabaseService ("http://localhost:7474/db/data")
File "C:\Python27\lib\site-packages\py2neo\neo4j.py", line 557, in __init__
rs = self._send(rest.Request(self, "GET", self._uri))
File "C:\Python27\lib\site-packages\py2neo\rest.py", line 372, in _send
raise SocketError(err)
SocketError: error(10061, 'No connection could be made because the target machine actively refused it')
我使用 Windows 7。我进行了几次搜索,发现我必须打开端口 7474 才能在具有高级安全性的 Windows 防火墙中使用它,但是当我在入站规则中创建新规则时,这不会影响该端口。同样在 ubuntu 10.10 中,我无法使用netcat打开端口:
nc -l 7474
我哪里错了?谢谢你