4

I need to install a library that is only compatible with Python 3.5, is there a way to change the Python version in Colab from 3.6 to 3.5?

nbro
  • 12,226
  • 19
  • 85
  • 163
Timothy Kassis
  • 141
  • 1
  • 2
  • 7

2 Answers2

3

The only way to vary the python3 version is to connect to a local runtime.

Craig Citro
  • 6,046
  • 1
  • 26
  • 27
2

You cannot directly change the environment for the notebook. After hours of exploration found a solution:

  1. Initialize a Ngork server in the colab notebook.
  2. connect to the Ngork server from a local terminal using ssh(Or use any editor which supports ssh connections)
  3. Install the required python version using the terminal.
  4. Install virtualenv.
  5. create a virtual environment by specifying the python version installed.
  6. Activate the environment.
  7. Work in that environment from the terminal directly.

Check out this link which provides to get detailed description on how to follow the steps.

Eswar Chitirala
  • 169
  • 1
  • 9