Modules not found when running VS Code but its running perfectly in jupyter notebook

43 Views Asked by At

I was trying to work with ipynb in VS Code. I tried importing pandas, numpy and some other modules but each of the time it throws an error "Module not found" even though they are all installed. Although when I launch same directory in jupyter notebook then it didn't cause any problem.

Can someone please suggest a way to deal with this problem? And it would be great if you suggest something without using Virtual Environment. Jupter image

    VS code: 
    ModuleNotFoundError                       Traceback (most recent call last)
    Cell In[2], line 1
    ----> 1 import torch
    ModuleNotFoundError: No module named 'torch'

I tried looking on Stackoverflow but none of the methods gives solution without involving virtual environment.

0

There are 0 best solutions below