Changing pytorch version in google colab

I am trying to change the version of pytorch and torchvision to 1.7.1 and 0.8.2 in my colab notebook. I have tried several times but still it shows 2.1.0+cu121 for torch and 0.16.0+cu121 for torchvision, when I use torch.version
First I changed the python version to 3.7
then I uninstall the current torch version using:
!pip uninstall torch -y
and then instal torch version 1.7.1 using:
!pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
what am I doing wrong?