Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

  1. 在使用命令行cmd导入python中的matplotlib包或其他包时

提醒       ModuleNotFoundError: No module named 'matplotlib._image'     错误

Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

或者下述错误。

Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

2.可能原因是matplotlib包没有安装完全或者版本太旧。可以在命令行中输入 pip install matplotlib 查看安装情况及位置。

          正常如果没有安装的话,输入上述的命令会出现如下的界面,表示正在安装。安装成功会提示“Successfully installed xxx”

         Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法                                                                   Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

但是我的电脑却出现了如下的提醒。继续看下一步

Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

3.按电脑的提醒(加了  --user),尝试使用pip install --user matplotlib 安装成功,如下。

Python中导入包错误module not founderror: No module named 'matplotlib._image' 解决方法

**************************再然后如果还解决不了*******************************8

4.使用pip list --outdated 查看哪些包需要更新

5.再使用 pip install --upgrade matplotlib 更新matplotlib包。