Faster RCNN训练的时候,出现错误:
from matplotlib import path, transforms File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 124, infrom . import cbookImportError: cannot import name cbook
同时python调用matplotlib也会出现以下错误:
File "/usr/local/lib/python2.7/dist-packages/matplotlib/fontconfig_pattern.py", line 32, infrom backports.functools_lru_cache import lru_cacheImportError: No module named functools_lru_cache
找了很久才找到解决办法,至于原因暂不清楚。
原来安装matplotlib用的命令是:
sudo pip install matplotlib
这样就会有问题,不知道啥情况。卸掉matplotlib:
sudo pip uninstall matplotlib
换成
sudo apt-get install python-matplotlib
就没以上两个问题了。