2

我正在尝试neo4j使用gremlin. 我正在关注灯泡文档中的第一个示例,尝试导入bulbs.neo4jserver.Graph。我可以导入灯泡,它会看到 gremlin,但无法使用以下命令导入 Graph。

>>> import bulbs
>>> bulbs.gremlin
<module 'bulbs.gremlin' from 'C:\Anaconda\lib\site-packages\bulbs\gremlin.pyc'>
>>> from bulbs.neo4jserver import Graph
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: cannot import name Graph

我已经在 gremlin 和 rexster 上下载并运行了 maven。我正在使用 Python 2.7(Anaconda 安装)在 Windows 8 中工作。

还有什么事情你需要知道?

任何帮助表示赞赏。谢谢。

4

1 回答 1

1

你用的是什么版本的灯泡?

$ pip freeze | grep bulbs

你应该能够做到这一点......

$ python
Python 2.7.5 (default, Feb 19 2014, 13:47:28) 
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from bulbs.neo4jserver import Graph
>>> g = Graph()
于 2014-03-11T20:05:51.590 回答