It looks like there is a compatibility issue with PyTorch and Python 3.10 when I want to use google Colab.
I need to use !pip install torch==1.8 torchvision==0.9 but this problem don't let me.
I should do Downgrading.
I need to get code to downgarde Python version.
I have had a similar problem. It seems to be due to an 'upgrade' pushed to Colabs. I think this addresses that 'upgrade': https://github.com/googlecolab/colabtools/issues/3646#issuecomment-1570238781
There's maybe more to it than this, but this is how I downgraded python in my colabs notebook:
I hope this helps. Good luck.