2

Try build jupyter notebook on localhost, get error,

I use Windows 10 , updated Microsoft Visual C++ upto 14 version

tried pip uninstall pyzmq

pip uninstall jsonschema

pip install pyzmq

pip install jsonschema

but always this error

Traceback (most recent call last):
  File "c:\users\axon\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\axon\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\axon\AppData\Local\Programs\Python\Python38\Scripts\jupyter-notebook.EXE\__main__.py", line 7, in <module>
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\jupyter_core\application.py", line 268, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\traitlets\config\application.py", line 663, in launch_instance
    app.initialize(argv)
  File "<c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\decorator.py:decorator-gen-7>", line 2, in initialize
  File "c:\users\axon\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\axon\appdata\local\programs\python\python38\lib\site-packages\notebook\notebookapp.py", line 1679, in initialize
    self.init_webapp()
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\notebook\notebookapp.py", line 1442, in init_webapp
    self.http_server.listen(port, self.ip)
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\tornado\tcpserver.py", line 152, in listen
    self.add_sockets(sockets)
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets
    self._handlers[sock.fileno()] = add_accept_handler(
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler
    io_loop.add_handler(sock, accept_handler, IOLoop.READ)
  File "c:\users\axon\appdata\local\programs\python\python38\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler
    self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "c:\users\axon\appdata\local\programs\python\python38\lib\asyncio\events.py", line 501, in add_reader
    raise NotImplementedError
NotImplementedError
A1x1onlive
  • 41
  • 1
  • 5

1 Answers1

14
  1. Open the file ...\tornado\platform\asyncio.py
    (second to last file referenced in error message)

  2. Add the following lines to the code after "import asyncio":

    import sys
    if sys.platform == 'win32':
        asyncio.set_event_loop_policy (asyncio.WindowsSelectorEventLoopPolicy())
    

    and save the file.

  3. See the image: enter image description here

  4. Now just enter the command jupyter lab

crusy
  • 1,424
  • 2
  • 25
  • 54
Alana Melo
  • 132
  • 5