Skip to content

Commit 310ece4

Browse files
committed
Add how to solve numpy import error in Anaconda
1 parent 5e18d2c commit 310ece4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

09 Numeric Arrays and Data Visualization/1 NumPy - numeric arrays and calculations.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,20 @@ The third reason, and perhaps the most important, is the *library of numeric fun
350350
The ability to use code written in C or Fortran allows the use of old, optimized, proven solutions.
351351

352352

353+
## How to handle `ImportError: DLL load failed while importing _multiarray_umath` in Visual Studio Code
354+
355+
If you are using Anaconda and try to import `numpy`, you may encounter an error:
356+
357+
```
358+
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found
359+
```
360+
361+
It may happen if you have installed Anaconda without adding it to the system path. To solve it, you may try one of the following:
362+
363+
1. Remove Anaconda and reinstall it, making sure you check the option **Add Anaconda to the system PATH environment variable**,ignoring the installer warning.
364+
365+
2. In Visual Studio Code press `Ctrl+,` (control and comma) to open settings and type `python.terminal.activateEnvironment` in the search field in the settings panel. Next, check the box labeled **Activate Python Environment in Terminal created using the Extension**. Close all the existing terminals or restart the Visual Studio Code.
366+
353367
<hr/>
354368

355369
Published under [Creative Commons Attribution-NonCommercial-ShareAlike](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.

0 commit comments

Comments
 (0)