It's seems like the Python interpreter you're using in the shell is not the same one used by Vscode. You can change the Python environment to match the one you're using in your Shell, or even install selenium in the Python interpreter currently used with: python -m pip install -U selenium