See this page https://huggingface.co/transformers/installation.html 26
which says you can install from source using
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .

(I haven’t tried that, as I’m using Colab which already has a recent version)