How do I fix: ModuleNotFoundError: No module named 'numpy'

Hi all!

My problem is I get the typical ModuleNotFoundError: No module named 'numpy' error when using jupyter notebook in visual studio code.

I have done some tests, and I do have numpy installed and am able to use it in jupyter notebook (browser version), and in visual studio code when I open a python file, but I get the error when using jupyter notebook in visual studio code

Why could this be happening and what could I try to fix it?

Thanks for your time!

Jaime

image

image

It must be using different python interpreter when VS Code runs notebook. Try changing that with Python: Select Interpreter option from the command palette, before opening notebook in VS Code.

1 Like