问题
Can someone guide me how can I use the earlier version of python i.e version2.x?
Under change runtime option - I can see option for selecting hardware accelerator.
Thanks
回答1:
You can use this shortcut to create a Python 2 Colab.
bit.ly/colabpy2
It will forward to this URL.
https://colab.research.google.com/notebook#create=true&language=python2
回答2:
Python 2 reached its end of life on January 1, 2020, and is no longer supported by the Python developer community. Because of that, Colab is in the process of deprecating Python 2 runtimes; see https://research.google.com/colaboratory/faq.html#python-2-deprecation for details.
Presently, there is no way to change to Python 2 via the Colab UI, but existing Python 2 notebooks will still connect to Python 2 for the time being. So, for example, if you open a notebook like this one: https://colab.research.google.com/gist/jakevdp/de56c474b41add4540deba2426534a49/empty-py2.ipynb and execute code, it will execute in Python 2 for now. I would suggest following that link, and then choosing File->Save A Copy In Drive to get your own copy of an empty Python 2 notebook.
But please be aware that at some point in the future, Python 2 runtimes will be entirely unavailable in Colab, even for existing notebooks that specify Python 2 in their metadata.
来源:https://stackoverflow.com/questions/61475248/how-can-i-use-python-2-on-google-colab