pip install 'transformers[torch]'
🤗 Transformers and TensorFlow 2.0:

pip install 'transformers[tf-cpu]'

M1 / ARM Users
You will need to install the following before installing TensorFLow 2.0

brew install cmake
brew install pkg-config

🤗 Transformers and Flax:

pip install 'transformers[flax]'
Finally, check if 🤗 Transformers has been properly installed by running the following command. It will download a pretrained model: