I keep getting ModuleNotFoundError
after installing pyodbc
using pip
in VSCode.
This has happened a few times before, e.g. after installing pygame
, but after a few times it somehow works. This time it is not working at all.
I tried
import pip
gave me a ModuleNotFoundErrorpip install pyodbc
and pip3 install pyodbc
both say that the requirement is already satisfied. However when I run my code it is still giving me the same error.Maybe you really installed the pyodbc
package, but you don't necessarily use the python environment where the pyodbc
package is installed.
Ctrl+Shift+P --> Python: Select Interpreter
--> selects the correct interpreter.
Don't forget to use the Python extension to execute the script (Run Python File).