0

我有一个奇怪的问题。刚开始用neo4j db,想玩一点

我从那里下载了代码

https://github.com/neo4j-examples/python-shop-categories

在示例中

import neo4j # works fine

from neo4j.util import Subreference # doesnt work

错误

    File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
 "__main__", fname, loader, pkg_name)
 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
  exec code in run_globals
 File "/home/mohit/Documents/personal_pro/python-shop-categories/shop/__main__.py", line 65, in <module>
   options.ui.start(*args, **params)
 File "/home/mohit/Documents/personal_pro/python-shop-categories/shop/__main__.py", line 49, in start
  exec("from shop.%sui import start" % (self.module,), environ)
 File "<string>", line 1, in <module>
  File "/home/mohit/Documents/personal_pro/python-shop-categories/shop/__init__.py", line 13, in <module>
   from neo4j.util import Subreference
 ImportError: cannot import name Subreference

所以我猜一切都已安装..并设置..一个导入如何工作但另一个不工作?

谢谢

4

2 回答 2

2

那是一些在 2 年内没有更新的旧代码,所以它不会工作。

请尝试使用灯泡快速入门:http: //bulbflow.com/quickstart/

  • 詹姆士
于 2012-07-11T02:50:30.343 回答
0

有关更多更新示例,请尝试http://docs.neo4j.org/chunked/snapshot/python-embedded-installation.html等。

于 2012-07-13T11:49:21.087 回答