最近要写机器学习的课程,又要用到python,装完了jupyter notebook,运行的时候报错NotImplementedError
最后几行是这样子的:
File "c:\users\48530\appdata\local\programs\python\python38\lib\site-packages\tornado\platform\asyncio.py", line 100, in add_handler
self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
File "c:\users\48530\appdata\local\programs\python\python38\lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError
需要在:c:\users\user\appdata\local\programs\python\python38\lib\site-packages\tornado\platform\asyncio.py (文件名不变 ,具体位置还要看具体报错信息)中加入以下代码:
(注意:要加在文件的末尾)
import sys
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
然后就能愉快的运行jupyter notebook啦!