Search code examples
pythonnetworkxpyzo

NetworkX Test Failure


I installed NetworkX via conda on pyzo4.4.1. The python version I use is 3.6.1

conda install networkx
conda update networkx

As it is suggested in the installation guide of NetworkX, I also installed nose for testing and ran the full test with the following command:

import networkx as nx
nx.test()

To my surprise, it yielded 57 failed tests. Here is a link to the complete log. Here's a short summary:

Failure:
test_kcomponents.test_example_1_detail_3_and_4
----------------------------------------------------------------------------
Approximate current-flow betweenness centrality: K4
 # in total there are 9 other failed tests concerning betweenness centrality
----------------------------------------------------------------------------
test_hits.TestHITS.test_hits
 # 4 of these
----------------------------------------------------------------------------
test_pagerank.TestPageRank.test_dangling_pagerank
 # 12 of these
----------------------------------------------------------------------------
test_branchings.test_greedy_max1
  # 4 of these
...

I tried removing the networkx and decorator and reinstalling it via conda. I then removed it yet again and installed via pip, still it does not work. I need some of the functions that are failing the tests (for example betweenness). Help would be greatly appreciated.


Solution

  • The current release of networkx does not support Python 3.6. We will release networkx 2.0 soon and this will no longer be an issue. The 2.0 release changes quite a few things, which is why it has taken longer to finalize than previous releases. Thanks for your patience.

    You can follow 2.0 development here:

    https://github.com/networkx/networkx/milestone/3

    and read a draft of the release notes here:

    http://networkx.readthedocs.io/en/latest/news.html

    You can install the current master branch using:

    $ pip install git+http://github.com/networkx/networkx
    

    The master branch should be in good shape and we would love additional feedback on it as we finalize the 2.0 release.