Announcement: NetworkX 2.6

We’re happy to announce the release of NetworkX 2.6! NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

For more information, please visit our website and our gallery of examples. Please send comments and questions to the networkx-discuss mailing list.


This release is the result of X of work with over X pull requests by X contributors. Highlights include:

  • Dropped support for Python 3.6.

  • NumPy, SciPy, Matplotlib, and pandas are now default requirements.


  • [#4319] pagerank uses scipy by default now.

  • [#4317] New source argument to has_eulerian_path to look for path starting at source.

  • [#4640] prefix_tree now uses a non-recursive algorithm. The original recursive algorithm is still available via prefix_tree_recursive.

API Changes

  • [#4190] Removed tracemin_chol. Use tracemin_lu instead.

  • [#4216] In to_*_array/matrix, nodes in nodelist but not in G now raise an exception. Use G.add_nodes_from(nodelist) to add them to G before converting.

  • [#4360] Internally nx_pylab.draw_networkx_edges now always generates a list of matplotlib.patches.FancyArrowPatch rather than using a matplotlib.collections.LineCollection for un-directed graphs. This unifies interface for all types of graphs. In addition to the API change this may cause a performance regression for large graphs.

  • [#4384] Added edge_key parameter for MultiGraphs in to_pandas_edgelist

  • [#4466] relabel_nodes used to raise a KeyError for a key in mapping that is not a node in the graph, but it only did this when copy was False. Now any keys in mapping which are not in the graph are ignored.

  • [#4573] label_propagation_communities returns a dict_values object of community sets of nodes instead of a generator of community sets. It is still iterable, so likely will still work in most user code and a simple fix otherwise: e.g., add iter( ... ) surrounding the function call.

  • [#4545] prefix_tree used to return tree, root but root is now always 0 instead of a UUID generate string. So the function returns tree.

  • [#4545] The variable NIL =”NIL” has been removed from networkx.generators.trees

  • [#3620] The function naive_greedy_modularity_communities now returns a list of communities (like greedy_modularity_communities) instead of a generator of communities.


  • [#4238] Deprecate to_numpy_matrix and from_numpy_matrix.

  • [#4279] Deprecate networkx.utils.misc.is_iterator. Use isinstance(obj, instead.

  • [#4280] Deprecate networkx.utils.misc.is_list_of_ints as it is no longer used. See networkx.utils.misc.make_list_of_ints for related functionality.

  • [#4281] Deprecate read_yaml and write_yaml.

  • [#4282] Deprecate read_gpickle and write_gpickle.

  • [#4298] Deprecate read_shp, edges_from_line, and write_shp.

  • [#4319] Deprecate pagerank_numpy, pagerank_scipy.

  • [#4355] Deprecate copy method in the coreview Filtered-related classes.

  • [#4384] Deprecate unused order parameter in to_pandas_edgelist.

  • [#4428] Deprecate jit_data and jit_graph.

  • [#4449] Deprecate consume.

  • [#4448] Deprecate iterable.

  • [#4545] Deprecate generate_unique_node.

  • [#4599] Deprecate empty_generator.

  • [#4617] Deprecate hub_matrix and authority_matrix

  • [#4629] Deprecate the Ordered graph classes.

Contributors to this release

<output of>

Pull requests merged in this release

<output of>