python 2.7 的 Tornado 只需要 python 3+ 的 asyncio
Tornado for python 2.7 requires asyncio which is python 3+ only
我开始使用 gremlinclient,它需要是用于 websockets 的 Tornado。但是 Tornado 使用需要 Python 3+ 的 asyncio 模块。考虑到 Tornado 与 Python 2.7 兼容,我不确定我应该如何让 asyncio 使用它。
我错过了什么?我该如何解决?
Tornado is also compatible with Python 3
引用上面的文档link(强调我的):
Prerequisites: Tornado 4.3 runs on Python 2.6, 2.7, and 3.2+ (support for Python 2.6 and 3.2 is deprecated and will be removed in the next release). For Python 2, version 2.7.9 or newer is strongly recommended for the improved SSL support. In addition to the requirements which will be installed automatically by pip or setup.py install, the following optional packages may be useful:
Tornado 可以 运行 在 asyncio 的 IOLoop 上,但这不是必需的。 它不在 Tornado(甚至 4.3)的要求中,您应该可以毫无问题地安装它。即使 asyncio 已移植到 python 2.7 - trollius.
顺便说一句,我在没有 asyncio/trollius 的情况下在 2.7 上使用 Tornado。
我开始使用 gremlinclient,它需要是用于 websockets 的 Tornado。但是 Tornado 使用需要 Python 3+ 的 asyncio 模块。考虑到 Tornado 与 Python 2.7 兼容,我不确定我应该如何让 asyncio 使用它。
我错过了什么?我该如何解决?
Tornado is also compatible with Python 3
引用上面的文档link(强调我的):
Prerequisites: Tornado 4.3 runs on Python 2.6, 2.7, and 3.2+ (support for Python 2.6 and 3.2 is deprecated and will be removed in the next release). For Python 2, version 2.7.9 or newer is strongly recommended for the improved SSL support. In addition to the requirements which will be installed automatically by pip or setup.py install, the following optional packages may be useful:
Tornado 可以 运行 在 asyncio 的 IOLoop 上,但这不是必需的。 它不在 Tornado(甚至 4.3)的要求中,您应该可以毫无问题地安装它。即使 asyncio 已移植到 python 2.7 - trollius.
顺便说一句,我在没有 asyncio/trollius 的情况下在 2.7 上使用 Tornado。