Jupyter Notebook - ModuleNotFoundError
Open a notebook. Install your packages through the notebook by entering in a notebook cell -
!pip install numpy
!pip install pandas
Then import
the_coder
Updated on July 05, 2022Comments
-
the_coder almost 2 years
I have Python 3.7 installed on my windows 10 laptop. i installed pandas and numpy a few days ago on my laptop and they worked fine when used in my jupyter notebook by writing
import numpy as np
andimport pandas as pd
. But today when i started my jupyter notebook again to practice the same error occurred a quite a few times.ModuleNotFoundError: No module named 'numpy'
I tried restarting the jupyter kernel many times and then executed the statement again and again but the same error displayed each time.
I've installed numpy using
pip install numpy
and pandas usingpip install pandas
i already tried installing pandas and numpy through my jupyter notebook using
!pip install numpy
and!pip install pandas
but the problem remains the same. Check out the below screenshots. Click on the link to view.I'm still learning python so can you please help me with this. I don't know what to do.
-
the_coder over 5 yearsi already tried what you said exactly the same but the problem still remains the same. Check my answer above where i am adding a link of two screenshots (one is the numpy error and another one for pandas error after installing it through jupyter notebook)
-
pyeR_biz over 5 yearsHave you set your environment paths?
-
the_coder over 5 yearsNo. How can we do that?
-
pyeR_biz over 5 years
-
pyeR_biz over 5 years
-
the_coder over 5 yearsHey, it worked. I tried following the commands from the above links. Thank You So Much.
-
pyeR_biz over 5 yearsGreat job, but you have to become better at using stack overflow. Always search for existing answers first. This one will be most likely marked duplicate
-
Py_minion over 4 years%pip install numpy %pip install pandas Then restart the kernel and execute the cells.
-
Sai Nikhil about 4 yearsMan, you saved my life. Thank you so much. No other solutions worked. This answer is very underrated. Others, please upvote and show your gratitude if it worked for you.