Matplotlib突然停止在Python中工作。我已经在IPython中更新了几个软件包,其中matplotlib仍然可以使用,但是在Python中它不再导入。我想强调一下,它正在Python 3.6(在PyCharm IDE中)中运行。
这是我收到的消息:
Traceback (most recent call last):
File "C:/Users/brouw/Python/BatchAnalysis/Test.py", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Users\brouw\Anaconda3\envs\Python\lib\site-packages\matplotlib\__init__.py", line 131, in <module>
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "C:\Users\brouw\Anaconda3\envs\Python\lib\site-packages\matplotlib\rcsetup.py", line 29, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "C:\Users\brouw\Anaconda3\envs\Python\lib\site-packages\matplotlib\fontconfig_pattern.py", line 28, in <module>
from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache
我在网上看到该问题在Python 2.7中非常常见,可以通过将matplotlib降级到以前的版本来解决,例如:python 2.7 functools_lru_cache does not import although installed
这似乎都不适合我。希望有人可以提供帮助。如果我使用的术语不正确(Python,IPython等),我深表歉意
谢谢
编辑:更改了Python 3.5-> 3.6