如何解决"NotImplementedError"问题尝试在Atom中运行氢气时 [英] How to fix "NotImplementedError" when trying to run Hydrogen in Atom

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

问题描述

我试图在Atom上运行Hydrogen,但是在异步python lib中,我收到一条错误消息,该错误消息以"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,并且我在jupyter上安装了ipython内核.

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:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ runpy.py",行192,在_run_module_as_main中返回_run_code(代码,main_globals,无,文件_run_code exec(code,run_globals)中的文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ runpy.py",行85,文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ site-packages \ ipykernel_launcher.py,第16行,位于app.launch_new_instance()文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ site-程序包\ traitlets \ config \ application.py",在launch_instance app.initialize(argv)中,行657,在初始化文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \中,行2"在catch_config_error返回方法(app,* args,** kwargs)中的lib \ site-packages \ traitlets \ config \ application.py,第87行,文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38初始化self.init_sockets()文件"C:\ Users \ chels \ AppData \ Lo"中的\ lib \ site-packages \ ipykernel \ kernelapp.py",第469行cal \ Programs \ Python \ Python38 \ lib \ site-packages \ ipykernel \ kernelapp.py",第259行,位于init_sockets self.init_iopub(上下文)文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 init_iopub中的\ lib \ site-packages \ ipykernel \ kernelapp.py行267,self.iopub_thread = IOPubThread(self.iopub_socket,pipe = True)文件" C:\ Users \ chels \ AppData \ Local \ Programs \ Python \初始化自我中的Python38 \ lib \ site-packages \ ipykernel \ iostream.py,第68行._setup_pipe_in()文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ site-packages \ ipykernel \ iostream.py",第141行,位于_setup_pipe_in self._pipe_in = ZMQStream(pipe_in,self.io_loop)文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ site-packages \ zmq \ eventloop \ zmqstream.py",第120行,位于初始self._init_io_state()文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ site-packages \ zmq \ eventloop \ zmqstream.py ,第541行,位于_init_io_state self.io_loop.add_handler(self.socket,self._handle_events,self.io_loop.READ)文件" C: \ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ site-packages \ tornado \ platform \ asyncio.py,第79行,位于add_handler self.asyncio_loop.add_reader(文件"C:\ Users \ chels \ AppData \ Local \ Programs \ Python \ Python38 \ lib \ asyncio \ events.py,第498行,在add_reader中引发NotImplementedError NotImplementedError

Traceback (most recent call last): File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\ipykernel_launcher.py", line 16, in app.launch_new_instance() File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\ipykernel\kernelapp.py", line 469, in initialize self.init_sockets() File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\ipykernel\kernelapp.py", line 259, in init_sockets self.init_iopub(context) File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\ipykernel\kernelapp.py", line 267, in init_iopub self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True) File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\ipykernel\iostream.py", line 68, in init self._setup_pipe_in() File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\ipykernel\iostream.py", line 141, in _setup_pipe_in self._pipe_in = ZMQStream(pipe_in, self.io_loop) File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\zmq\eventloop\zmqstream.py", line 120, in init self._init_io_state() File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\zmq\eventloop\zmqstream.py", line 541, in _init_io_state self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ) File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\site-packages\tornado\platform\asyncio.py", line 79, in add_handler self.asyncio_loop.add_reader( File "C:\Users\chels\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", line 498, in add_reader raise NotImplementedError NotImplementedError

推荐答案

异常来自龙卷风调用asyncio事件循环方法

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中运行氢气时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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