[Bug 252297] Issue with using py37-networkx and py37-matplotlib

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 31 03:31:54 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252297

            Bug ID: 252297
           Summary: Issue with using py37-networkx and py37-matplotlib
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: jeremy at coyotetrackz.com

I've been have an issue with python3 scripts using the networkx and matplotlib
libraries. An example python3 script is as follows:

#! /usr/bin/env python3

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import networkx as nx

if __name__ == '__main__':

        vertices = range(1, 10)
        edges = [(7,2), (2,3), (7,4), (4,5), (7,3), (1,6), (1,7), (2,8), (2,9)]

        G = nx.Graph()
        G.add_nodes_from(vertices)
        G.add_edges_from(edges)

        nx.draw(G)
        plt.savefig("node.png")


When the script get's to: nx.draw(G), the following error message is displayed:

Traceback (most recent call last):
  File "./05_imaging.py", line 17, in <module>
    nx.draw(G)
  File "/usr/local/lib/python3.7/site-packages/networkx/drawing/nx_pylab.py",
line 126, in draw
    draw_networkx(G, pos=pos, ax=ax, **kwds)
  File "/usr/local/lib/python3.7/site-packages/networkx/drawing/nx_pylab.py",
line 278, in draw_networkx
    edge_collection = draw_networkx_edges(G, pos, arrows=arrows, **kwds)
  File "/usr/local/lib/python3.7/site-packages/networkx/drawing/nx_pylab.py",
line 563, in draw_networkx_edges
    if not cb.iterable(width):
AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'


>From looking into the issue, it seems that this is an issue of
'matplotli.cbook' being deprecated since version 3.0 of matplotlib ... but it
is still being referenced in the current version of py37-networkx.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list