Importing the multiarray numpy extension module failed

from matplotlib import pyplot as pyp

然后运行文件时提示错误信息如下

....
....
ImportError: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

原因是 Aonconda的numpy 模块出现问题
进入 Aconconda 的Prompt的命令行执行

(base) C:\Users\hfh>pip uninstall numpy
Uninstalling numpy-1.15.4:
  Would remove:
    e:\soft\anaconda\lib\site-packages\numpy-1.15.4.dist-info\*
    e:\soft\anaconda\lib\site-packages\numpy\*
    e:\soft\anaconda\scripts\f2py.py
Proceed (y/n)? y
  Successfully uninstalled numpy-1.15.4

再次执行

(base) C:\Users\hfh>pip install numpy
Collecting numpy
  Using cached https://files.pythonhosted.org/packages/00/0e/5a8c34adb97fc1cd6636d78050e575945e874c8516d501421d5a0f377a6c/numpy-1.15.4-cp37-none-win_amd64.whl
Installing collected packages: numpy
Successfully installed numpy-1.15.4

你可能感兴趣的:(python)