13

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 and import 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 using pip 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.

pandas error

numpy error

I'm still learning python so can you please help me with this. I don't know what to do.

the_coder
  • 131
  • 1
  • 1
  • 5

1 Answers1

27

Open a notebook. Install your packages through the notebook by entering in a notebook cell -

!pip install numpy
!pip install pandas

Then import

pyeR_biz
  • 986
  • 12
  • 36
  • 2
    i 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) – the_coder Oct 18 '18 at 15:50
  • Have you set your environment paths? – pyeR_biz Oct 18 '18 at 15:54
  • No. How can we do that? – the_coder Oct 18 '18 at 15:56
  • https://stackoverflow.com/questions/40553560/jupyter-python3-notebook-cannot-recognize-pandas – pyeR_biz Oct 18 '18 at 16:20
  • https://stackoverflow.com/questions/52235013/modulenotfounderror-no-module-named-pandas-jupyter-notebook – pyeR_biz Oct 18 '18 at 16:20
  • Hey, it worked. I tried following the commands from the above links. Thank You So Much. – the_coder Oct 18 '18 at 16:50
  • Great 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 – pyeR_biz Oct 18 '18 at 17:24
  • %pip install numpy %pip install pandas Then restart the kernel and execute the cells. – Py_minion Dec 12 '19 at 16:37
  • Man, 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. – Sai Nikhil Apr 27 '20 at 22:07