Skip to content Skip to sidebar Skip to footer

Exception Has Occurred: Modulenotfounderror In Vscode But No Other Editors

This error occurs in VS code for pip installed modules. Exception has occurred: ModuleNotFoundError It was working on all previous days. I believe that i may have deleted a *.pyc f

Solution 1:

One solution (which works) is to recreate all the folders and subfolders.

It is also noted that this is not specific to python as seen here:

https://github.com/Microsoft/vscode/issues/10391

There is also a suggestion here (which is close, but did not resolve the issue):

vscode import error for python module.

I have noticed that if I use File -> Close folder and then File -> Open Folder... and open the project folder again, the errors are gone.

Solution 2:

VStudio may be using a different python interpreter. Just click here and select the proper one:enter image description here

enter image description here

Post a Comment for "Exception Has Occurred: Modulenotfounderror In Vscode But No Other Editors"