【发布时间】:2023-03-28 19:31:01
【问题描述】:
今天(2021 年 3 月 30 日)我升级了 matplotlib 和 seaborn 包。
但是,在那之后,我无法导入 matplotlib 和 seaborn 包。
每当我尝试导入 matplotlib 或 seaborn 时, 我收到如下错误消息。
我该如何解决这个问题?
(我使用的是 JupyterLab 3.0)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-33-a0d2faabd9e9> in <module>
----> 1 import matplotlib.pyplot as plt
C:\dev\anaconda3\lib\site-packages\matplotlib\__init__.py in <module>
819 # triggering resolution of _auto_backend_sentinel.
820 rcParamsDefault = _rc_params_in_file(
--> 821 cbook._get_data_path("matplotlibrc"),
822 # Strip leading comment.
823 transform=lambda line: line[1:] if line.startswith("#") else line,
C:\dev\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py in _get_data_path(*args)
478 if opened:
479 with fh:
--> 480 yield fh
481 else:
482 yield fh
AttributeError: module 'matplotlib' has no attribute 'get_data_path'
【问题讨论】:
标签: python matplotlib seaborn attributeerror