Issue
I have installed numpy using pip install numpy In the current directory. But when I try to import it in my jupyter notebook, it gives an error. ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_17100/2172125874.py in ----> 1 import numpy
ModuleNotFoundError: No module named 'numpy'
Please help me resolve this problem. I have tried uninstalling numpy and re-installing, yet it does not work at all. I am using a Windows 10 system.
Solution
First, pip install numpy
will install NumPy package in python/site-package, not the current directory. You can type pip show numpy
in the terminal to check its information(path, version...).
Secondly, Maybe the interpreter you choose in Jupyter notebook is not the same as the one you installed numpy on. You might need to check that.
To check Whether it has numpy. You might use pip list
to check that, in case pip
corresponds to the interpreter you wanna check.
Hope this will help you.
Answered By - Rubywong
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.