I am using VS Code to code in Python. Every time I try to import a Python module from a relative path, there is the above error. There is nothing wrong with the folder path. I have tried the relative path import in Pycharm and it works fine.
I read a few posts about a similar bug occurring in VScode about a year ago. Does anyone know the solution?
from folder1.python1 import hello
hello() # Simply should print "hello"
ModuleNotFoundError: No module named 'folder1'
The path folder1.python1
is automatically intellisensed by the way.