参考:https://blog.csdn.net/HuaCode/article/details/87270648 问题原因解决 将matplotlib安装在python3下 sudo apt-get install python3-matplotlib 或者 pip install --user matplotlib