ImportError in Jupyter notebook

Hello,

 

I run the jupyter notebook, but I am getting "ImportError."

Let me explain it in more detail.

 

I have two projects, A and B.

Both projects are using the same conda environment. 

When I import "numpy" in the A project, it gives me an ImportError, while it doesn't in the B project. 

The error message is below. 

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:
 
 
Please note and check the following:
 
  * The Python version is: Python3.7 from "C:\Users\z0048drc\AppData\Local\miniconda3\envs\Work-main\python.exe"
  * The NumPy version is: "1.21.5"
 
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: The specified module could not be found.

One additional weird thing is that I can import built-in methods, such as sys and random, in the A project. 

Also, when I copy the script, which cannot be imported modules from project A to B, and the script could be run. 

So I assume this is a problem of the project setting or whatever, but I cannot find the solution. 

 

Thanks for your help in advance!

Do you have any clue to solve this problem? 

I just checked all paths, and both projects have the same path except for depended path to the project. 

0
1 comment

Hi Jinhokim Kor,

I recommend you reinstall numpy, and check if the problem remains.

Also, please check PATH as described in this article https://numpy.org/devdocs/user/troubleshooting-importerror.html.

Additionally, please let me know which version of PyCharm you use. 

0

Please sign in to leave a comment.