当前位置: 代码迷 >> python >> 从Python中的bulbs.neo4jserver导入图形时出错
  详细解决方案

从Python中的bulbs.neo4jserver导入图形时出错

热度:124   发布时间:2023-06-19 09:34:24.0

我正在尝试使用gremlin运行neo4j 我正在跟踪bulbs文档中的第一个示例之一,尝试导入bulbs.neo4jserver 我可以导入灯泡,它显示为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。 我正在Windows 8中使用Anaconda安装的Python 2.7。

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

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

您正在使用哪个版本的灯泡?

$ 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()