2

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.

  • 2
    I don´t think you can choose a Python version in google colab: it is their infrastructure. Just install and run Python yourself. – jsbueno Jun 09 '23 at 18:46

1 Answers1

0

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:

!sudo apt-get update -y
!sudo apt-get install python3.8 -y
!echo 2 | sudo update-alternatives --config python3 #'echo 2' auto-inputs '2' so that it doesn't have to be done manually

I hope this helps. Good luck.

Qmachine
  • 1
  • 1