DLL load failed while importing _multiarray_umath

created at 06-27-2021 views: 95

Description

I haven't moved anything recently, and suddenly it can't run. The fault is as follows. Checked it should be a version issue.

ImportError: Unable to import required dependencies:
numpy: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.8 from "d:\program files (x86)\python38-32\python.exe"
  * The NumPy version is: "1.19.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: 拒绝访问。

Solution

Update the Numpy package
The way is shown in the figure below. Open a command line window and enter:

pip install --upgrade numpy --user

Attention! Be sure to add --user, otherwise an error will be reported. That's it~~~

created at:06-27-2021
edited at: 06-27-2021: