我正在使用基于python的紧密绑定代码Pybinding,在导入它时出现以下错误:
>>> import pybinding as pb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python3.6/site-packages/pybinding/__init__.py", line 35, in <module>
from .model import *
File "/usr/local/lib64/python3.6/site-packages/pybinding/model.py", line 6, in <module>
from . import results
File "/usr/local/lib64/python3.6/site-packages/pybinding/results.py", line 11, in <module>
from . import pltutils
File "/usr/local/lib64/python3.6/site-packages/pybinding/pltutils.py", line 465, in <module>
pb_style = _make_style()
File "/usr/local/lib64/python3.6/site-packages/pybinding/pltutils.py", line 425, in _make_style
palette = list(get_palette('Set1'))
File "/usr/local/lib64/python3.6/site-packages/pybinding/pltutils.py", line 327, in get_palette
palette = cmap(bins)[:, :3]
File "/usr/lib64/python3.6/site-packages/matplotlib/colors.py", line 485, in __call__
cbook._putmask(xa, xa == 1.0, almost_one)
AttributeError: module 'matplotlib.cbook' has no attribute '_putmask'
我已尝试过此处发布的所有问题排查步骤: Stack overflow link
同时安装并重新安装matplotlib和pybinding包,但它还没有解决我的问题。我使用fedora 27作为我的操作系统,输出imp.find_module是:
(None, '/usr/lib64/python3.6/site-packages/matplotlib', ('', '', 5))