After installing PyRosetta in Colab, here is an example for how you would initialize PyRosetta in Colab and use it.
# Notebook setup
import sys
if 'google.colab' in sys.modules:
!pip install pyrosettacolabsetup
import pyrosettacolabsetup
pyrosettacolabsetup.setup()
print ("Notebook is set for PyRosetta use in Colab. Have fun!")
from pyrosetta import *
pyrosetta.init()
test = Pose() # to check that it works