问题描述
我一直在 https://colab.research.google.com 上尝试使用Jupyter笔记本. ,并且似乎默认情况下它们运行的是Python 2.7.
I have been experimenting with the Jupyter notebooks at https://colab.research.google.com, and it seems that by default they run Python 2.7.
有什么方法可以在CoLab上启用Python 3支持吗?
Is there any way to enable Python 3 support on CoLab?
推荐答案
是的! Python3支持现已在Colab中提供.
Yes! Python3 support is now live in Colab.
-
在创建新笔记本时,Python2或Python3现在有一个选项.
When creating a new notebook, there's now an option for Python2 or Python3.
对于现有笔记本电脑,Runtime
-> Change runtime type
将允许您切换.
For an existing notebook, Runtime
-> Change runtime type
will let you switch.
我们将语言信息写入笔记本元数据的kernelspec
中,因此切换运行时类型不仅仅是按会话进行.
We write the language info into the kernelspec
in the notebook metadata, so switching runtime type isn't just per-session.
这篇关于Google CoLab中的Python 3支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!