after installing with python 3.9
% python3.9 -c 'import pygraphviz'
python3.9 -c 'import pygraphviz'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/__init__.py", line 58, in <module>
from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/agraph.py", line 22, in <module>
from . import graphviz as gv
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/graphviz.py", line 28, in <module>
_graphviz = swig_import_helper()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/graphviz.py", line 24, in swig_import_helper
_mod = imp.load_module('_graphviz', fp, pathname, description)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so, 2): Symbol not found: _PyIOBase_Type
Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so
Expected in: flat namespace
in /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so
In 6c4777d8218680168d490592d13455b1e6d036d9/macports-ports (master):