How can I install a older pytorch cuda version(to be specific 1.4) on google colab?)

The newer PyTorch version 1.5 is now preinstalled on google colab. But my code is not working on the newer version, that’s why I want to install the PyTorch version 1.4.

But when using(i dont know if that breaks cuda on colab hopefully not):
!pip install pytorch==1.4
I get the error message:

ERROR: Could not find a version that satisfies the requirement pytorch==1.4 (from versions: 0.1.2, 1.0.2)
ERROR: No matching distribution found for pytorch==1.4

Can someone help me?

You can find the instructions on the website here.
In particular, you’re missing the -f part of the command.