After installing a new module via pip, and vscode doesn’t recognize it,
Reloading vscode may work.
Make sure the module is installed inside the virtual environment by creating and activating a virtualenv:
python3 -m venv env
source env/bin/activate
Use the correct way of installing a module with pip:
python3 -m pip install new_module
Replace the string “new_module” with your module name.
Reload vscode by clicking Ctrl+Shift+P, and selecting Reload window.
Now vscode will know the new module and autocompletion works.