有没有办法在 Colaboratory 中导入 __future__
Is there a way to import __future__ in Colaboratory
我想在 Colaboratory 上 运行 一个 Python 程序。它 运行s 使用 PyCharm 成功,但它需要 __future__
。当我在 Colaboratory 上尝试时,出现此错误。
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
关于如何在 Colaboratory 上导入 __future__
有什么建议吗?
谢谢。
__future__
存在。那个特定的 __future__
功能没有。 Google Colaboratory 目前在 Python 3.6,from __future__ import annotations
是 3.7。
如果需要Python3.7,则需要等待。
我想在 Colaboratory 上 运行 一个 Python 程序。它 运行s 使用 PyCharm 成功,但它需要 __future__
。当我在 Colaboratory 上尝试时,出现此错误。
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
关于如何在 Colaboratory 上导入 __future__
有什么建议吗?
谢谢。
__future__
存在。那个特定的 __future__
功能没有。 Google Colaboratory 目前在 Python 3.6,from __future__ import annotations
是 3.7。
如果需要Python3.7,则需要等待。