1

我是 python-networkx 的新用户,当我在这里尝试 all_shortest_paths 函数时,它以某种方式显示错误

ps:我已经将networkx更新到最新版本

>>> import networkx as nx
>>> print nx.__version__
1.7
>>> G = nx.complete_graph(4)
>>> print nx.all_simple_paths(G, source=0, target=3, cutoff=2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'all_simple_paths'

谢谢!该软件包似乎安装得很好,我尝试的其他功能没有这个问题。

>>> print  help(nx)


NAME
    networkx

FILE
    /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/networkx/__init__.py

DESCRIPTION
    NetworkX
    ========

        NetworkX (NX) is a Python package for the creation, manipulation, and
        study of the structure, dynamics, and functions of complex networks.

        https://networkx.lanl.gov/

    Using
    -----

        Just write in Python
4

0 回答 0