python -m venv .env
Activate the virtual environment. On Linux and MacOs:

source .env/bin/activate
Activate Virtual environment on Windows

.env/Scripts/activate
Now you're ready to install 🤗 Transformers with the following command:

pip install transformers
For CPU-support only, you can conveniently install 🤗 Transformers and a deep learning library in one line. For example, install 🤗 Transformers and PyTorch with:

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