Magicode logo
Magicode
0

VSCode+Miniconda環境でnumpyのImportErrorを解決する

2 min read

問題

例外が発生しました: ImportError

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.7 from "C:\miniconda3\envs\ICSS\python.exe"
  • The NumPy version is: "1.21.6"

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: 指定されたモジュールが見つかりません。

During handling of the above exception, another exception occurred:

File "C:\python-test\gazou.py", line 18, in import numpy as np

解決方法(弱)

Anaconda Promptから起動すればOK

解決方法(強)

こちらの方がスマートな解決手段だと思います。

https://jp.magicode.io/shin1007/articles/42d2391acd014a7db811543e4408af6a

Discussion

コメントにはログインが必要です。