7

I'm runing a python code for deep learning in google colab. Python 3.5 is required for that code. How can I install Python 3.5 version in google colab ?

star123
  • 323
  • 2
  • 3
  • 9

4 Answers4

6

This worked for me.

!apt-get install python3.5
Nabeel Raza
  • 71
  • 1
  • 8
0

If you do !python3 --version you can see colab current uses Python 3.6.7 which is "python version of 3.5 or above"

alternatively you can use local runtime, this will allow you to use different versions of python

0101
  • 1,036
  • 2
  • 14
  • 24
0
!sudo apt-get install python 3.5

execute this code in colab cell. Once you are done restart you colab session.

  • 1
    Please explain why you think that `sudo` is needed, in contrast to existing and upvoted answer which seems to disagree. – Yunnosch Oct 02 '22 at 19:32
-1

Installation of Python in colab 1- for installation code

!apt-get install python3.9

2- for version code

!python3.9 --version
moken
  • 3,227
  • 8
  • 13
  • 23
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 13 '23 at 16:26
  • 2
    Answer needs supporting information Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](https://stackoverflow.com/help/how-to-answer). – moken Jul 15 '23 at 08:58