Faster RCNN训练的时候,出现错误:

    from matplotlib import path, transforms
  File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 124, in <module>
    from . import cbook
ImportError: cannot import name cbook

同时python调用matplotlib也会出现以下错误:

  File "/usr/local/lib/python2.7/dist-packages/matplotlib/fontconfig_pattern.py", line 32, in <module>
    from backports.functools_lru_cache import lru_cache
ImportError: No module named functools_lru_cache

找了很久才找到解决办法,至于原因暂不清楚。

原来安装matplotlib用的命令是:

 sudo pip install matplotlib

这样就会有问题,不知道啥情况。卸掉matplotlib

sudo pip uninstall matplotlib

换成

sudo apt-get install python-matplotlib

就没以上两个问题了。

 

相关文章:

  • 2021-08-06
  • 2021-09-27
  • 2022-01-05
  • 2021-12-17
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-03
  • 2021-12-24
  • 2021-12-29
  • 2021-07-27
  • 2021-08-12
  • 2022-01-19
  • 2021-11-26
相关资源
相似解决方案