运行python程序报错:ImportError: DLL load failed: 找不到指定的模块。
原因:numpy模块错误,重装numpy
1、升级pip
命令:python -m pip install --upgrade pip
报错
网上说是,pip文件源错误,在window 用户目录下添加pip/pip.ini(utf-8编码),使用国内镜像:
[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
再次运行命令正确
2、卸载numpy,安装numpy
pip uninstall numpy
pip install numpy
3、卸载sklearn,重装
pip uninstall scikit-learn
pip install scikit-learn
4、卸载 scipy,并重装
pip uninstall scipy
pip install scipy
5、卸载matplotlib,并重装
pip uninstall matplotlib
pip install matplotlib
6、卸载PIL,并重装
pip uninstall pillow
pip install pillow