尝试导入seaborn时遇到错误。我已经安装了matplotlib v3.0.3和seaborn v0.9.0。我尝试运行的代码是:
#! /usr/bin/python3
import seaborn
运行上面的代码将产生以下输出:
Traceback (most recent call last):
File "/home/transaid/.local/lib/python3.5/site-packages/matplotlib/__init__.py", line 861, in __setitem__
cval = self.validate[key](val)
KeyError: 'axes.color_cycle'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./testmatplotlib.py", line 3, in <module>
import seaborn
File "/usr/lib/python3/dist-packages/seaborn/__init__.py", line 13, in <module>
set()
File "/usr/lib/python3/dist-packages/seaborn/rcmod.py", line 98, in set
set_palette(palette, color_codes=color_codes)
File "/usr/lib/python3/dist-packages/seaborn/rcmod.py", line 491, in set_palette
mpl.rcParams["axes.color_cycle"] = list(colors)
File "/home/transaid/.local/lib/python3.5/site-packages/matplotlib/__init__.py", line 868, in __setitem__
'list of valid parameters.' % (key,))
KeyError: 'axes.color_cycle is not a valid rc parameter. See rcParams.keys() for a list of valid parameters.'
关于出了什么问题以及如何解决这个问题的任何线索?