安装matplotlib后import报错,提示
import matplotlib mportError: DLL load failed: 找不到指定的模块
Importing the numpy C-extensions failed. This error can happen formany reasons
具体是版本不匹配。 据说是在线pip install numpy时因为在线下载numpy库中缺少DLL。
在https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy这个网站下载了Numpy+MKL 版本的重新安装后,报错信息少了一些,显示
from . import ft2font ImportError: DLL load failed: 找不到指定的模块
经查资料,这个信息是matplotlib版本的问题,默认安装的是3.2.2版本
pip install matplotlib==3.2.0
会卸载现有版本重新安装3.2.0版,安装好后,问题解决。