如何修复“NotImplementedError"尝试在 Atom 中运行 Hydrogen 时 [英] How to fix "NotImplementedError" when trying to run Hydrogen in Atom

查看:26
本文介绍了如何修复“NotImplementedError"尝试在 Atom 中运行 Hydrogen 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Atom 上运行 Hydrogen,但在 asyncio python 库中收到一条以NotImplementedError"结尾的错误消息.

I am trying to run Hydrogen on Atom, but I am getting an error message that ends with "NotImplementedError" in the asyncio python lib.

我在 Windows 10 机器上安装了 Python3,并且我安装了 ipython 内核和 jupyter.

I have Python3 installed on a Windows 10 machine, and I have the ipython kernel installed with jupyter.

我收到以下错误消息,我不确定从哪里开始解决问题.

I am getting the following error message, and I am not sure where to start to fix the problem.

回溯(最近一次调用):文件C:UserschelsAppDataLocalProgramsPythonPython38lib unpy.py",第 192 行,在 _run_module_as_main 中 return _run_code(code, main_globals, None, 文件 "C:UserschelsAppDataLocalProgramsPythonPython38lib unpy.py", line 85, in _run_code exec(code, run_globals) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernel_launcher.py",第 16 行,在 app.launch_new_instance() 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-package raitletsconfigapplication.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packages raitletsconfigapplication.py",第 87 行,在 catch_config_error 返回方法(app, *args, **kwargs)文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernelkernelapp.py",第 469 行,在初始化 self.init_sockets() 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernelkernelapp.py",第 259 行,在 init_sockets self.init_iopub(context) 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernelkernelapp.py",第 267 行,在 init_iopub self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True) 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykerneliostream.py",第 68 行,在 init self._setup_pipe_in() 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykerneliostream.py",第 141 行,在 _setup_pipe_in self._pipe_in = ZMQStream(pipe_in, self.io_loop) 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packageszmqeventloopzmqstream.py",第 120 行,在 init self._init_io_state() 文件C:UserschelsAppDataLocalProgramsPythonPython38libsite-packageszmqeventloopzmqstream.py",第 541 行,在 _init_io_state self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ) 文件中"C:UserschelsAppDataLocalProgramsPythonPython38libsite-packages ornadoplatformasyncio.py",第 79 行,在 add_handler self.asyncio_loop.add_reader(文件C:UserschelsAppDataLocalProgramsPythonPython38libasyncioevents.py",第 498 行,在 add_reader 中引发 NotImplementedError NotImplementedError

Traceback (most recent call last): File "C:UserschelsAppDataLocalProgramsPythonPython38lib unpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "C:UserschelsAppDataLocalProgramsPythonPython38lib unpy.py", line 85, in _run_code exec(code, run_globals) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernel_launcher.py", line 16, in app.launch_new_instance() File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packages raitletsconfigapplication.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packages raitletsconfigapplication.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernelkernelapp.py", line 469, in initialize self.init_sockets() File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernelkernelapp.py", line 259, in init_sockets self.init_iopub(context) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykernelkernelapp.py", line 267, in init_iopub self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykerneliostream.py", line 68, in init self._setup_pipe_in() File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packagesipykerneliostream.py", line 141, in _setup_pipe_in self._pipe_in = ZMQStream(pipe_in, self.io_loop) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packageszmqeventloopzmqstream.py", line 120, in init self._init_io_state() File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packageszmqeventloopzmqstream.py", line 541, in _init_io_state self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ) File "C:UserschelsAppDataLocalProgramsPythonPython38libsite-packages ornadoplatformasyncio.py", line 79, in add_handler self.asyncio_loop.add_reader( File "C:UserschelsAppDataLocalProgramsPythonPython38libasyncioevents.py", line 498, in add_reader raise NotImplementedError NotImplementedError

推荐答案

异常来自 Tornado 调用 asyncio 事件循环方法 add_reader 在 Windows 上不受支持.

The exception comes from Tornado invoking the asyncio event loop method add_reader which is not supported on Windows.

Tornado 文档 陈述了有关平台的以下内容:

The Tornado documentation states the following about platforms:

平台: Tornado 应该在任何类 Unix 平台上运行,尽管为了获得最佳性能和可扩展性,只有 Linux(带有 epoll)和 BSD(带有 kqueue) 推荐用于生产部署(即使 Mac OS X 派生自 BSD 并支持 kqueue,但其网络性能普遍较差,因此仅推荐用于开发使用).Tornado 也将在 Windows 上运行,尽管此配置不受官方支持,建议仅用于开发用途.如果不重新设计 Tornado IOLoop 接口,就不可能添加本地 Tornado Windows IOLoop 实现或利用 AsyncIO 或 Twisted 等框架的 Windows IOCP 支持.

Platforms: Tornado should run on any Unix-like platform, although for the best performance and scalability only Linux (with epoll) and BSD (with kqueue) are recommended for production deployment (even though Mac OS X is derived from BSD and supports kqueue, its networking performance is generally poor so it is recommended only for development use). Tornado will also run on Windows, although this configuration is not officially supported and is recommended only for development use. Without reworking Tornado IOLoop interface, it’s not possible to add a native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO or Twisted.

最后一句的意思是 Tornado 的 asyncio 部分还不能在 Windows 上运行.

The last sentence means that the asyncio part of Tornado does not yet work on Windows.

这篇关于如何修复“NotImplementedError"尝试在 Atom 中运行 Hydrogen 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆