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 file or something to this extent.
If i do pip freeze
i can see the module.
For example import tweepy
could not be resolved, but i can see that it exists in pip freeze tweepy==3.10.0
and i can see with python --version
that i have the correct version Python 3.9.0
.
If i run the same on IDLE (python3.9
) the code works, which leads me to believe that this is a VScode issue, but i cannot tell what this is or how to fix it.
In fact, if i recreate new folders in VS code, the imports work too.
So the quesiton is, how can i identify where (which folder or file) the corruption is or what has caused VS code to break in this way ?