Try Command, Ctrl+Shift+P on vscode then searching "select python interpreter" and actually select the python environment where you installed the transformers library.