Visual Studio Code (VSCode) reports an error (yellow squiggly lines) saying "Import [nameOfModule] could not be resolved by Pylance (reportMissingImports)". You may be using a virtual environment (e.g., venv).
You need to tell Pylance where pip
has installed the module you are trying to import. This is called an "additional path".
- Find the location of the module. In the VSCode terminal within your project enter the python interpreter by typing
python
. - Once the interpreter is active (shown by >>> instead of $ or %) type
import [nameOfModule]
and press enter.