Python: ImportError: No module named backports.functools_lru_cache

Share:
## Error Description ```sh File "/home/yubao/data/software/rgbd_benchmark_tools/scripts/evaluate_ate.py", line 210, in import matplotlib File "/usr/lib/python2.7/dist-packages/matplotlib/__init__.py", line 127, in from matplotlib.rcsetup import defaultParams, validate_backend, cycler File "/usr/lib/python2.7/dist-packages/matplotlib/rcsetup.py", line 29, in from matplotlib.fontconfig_pattern import parse_fontconfig_pattern File "/usr/lib/python2.7/dist-packages/matplotlib/fontconfig_pattern.py", line 32, in from backports.functools_lru_cache import lru_cache ImportError: No module named backports.functools_lru_cache ``` ## Environment - Ubuntu 18 - Python 2.7 ## Solution ```sh pip install matplotlib==2.0.2 ``` ## Reference - https://stackoverflow.com/questions/47179433/python-2-7-functools-lru-cache-does-not-import-although-installed ![yubao_blog_cover](https://raw.githubusercontent.com/yubaoliu/assets/image/yubao_blog_cover.png)

No comments