i had currently install jupyter notebook for python3.8 by using this command
pip install jupyter
everything looks fine but when i try to open notebook via jupyter notebook
it gives me this error,
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\97798\Desktop\wEB PROJECTS\testenv\Scripts\jupyter-notebook.EXE\__main__.py", line 9, in <module>
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\jupyter_core\application.py", line 268, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\traitlets\config\application.py", line 663, in launch_instance
app.initialize(argv)
File "<c:\users\97798\desktop\web projects\testenv\lib\site-packages\decorator.py:decorator-gen-7>", line 2, in initialize
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\notebook\notebookapp.py", line 1720, in initialize
self.init_webapp()
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\notebook\notebookapp.py", line 1482, in init_webapp
self.http_server.listen(port, self.ip)
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\tornado\tcpserver.py", line 152, in listen
self.add_sockets(sockets)
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets
self._handlers[sock.fileno()] = add_accept_handler(
File "c:\users\97798\desktop\web projects\testenv\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler
io_loop.add_handler(sock, accept_handler, IOLoop.READ)
File "c:\users\97798\desktop\web projects\testenv\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:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.240.0_x64__qbz5n2kfra8p0\lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError
please help me
This issue has been addressed on #5047.
It provides a workaround on the meantime for existing releases.
Cheers!
Fixed by adding this code
import sys
if sys.platform == 'win32':
import asyncio
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
in python38/Lib/site-packages/tornado/platorm/asyncio.py after the main method.
great, thanks. It worked.
it isn't working for me can you please help
Fixed by adding this code
import sys if sys.platform == 'win32': import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())in
python38/Lib/site-packages/tornado/platorm/asyncio.pyafter the main method.
that's working but correct the path of the file, below is correct one
in
python38/Lib/site-packages/tornado/platform/asyncio.pyafter the main method.
Fixed by adding this code
import sys if sys.platform == 'win32': import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())in
python38/Lib/site-packages/tornado/platorm/asyncio.pyafter the main method.
Worked. Thank you!
Thx man, it worked!
thanks bro, it worked
Fixed by adding this code
import sys if sys.platform == 'win32': import asyncio asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())in
python38/Lib/site-packages/tornado/platorm/asyncio.pyafter the main method.
Thanks @SajjanKarn, this is the best solution for Python 3.8. 3 People already saved by yours.
Right on - glad to see success with this. For the benefit of others and now that notebook 6.0.3 is available, this issue can be addressed by upgrading notebook.
pip install notebook --upgrade
or, for conda envs,
conda update -c conda-forge notebook
Right on - glad to see success with this. For the benefit of others and now that notebook 6.0.3 is available, this issue can be addressed by upgrading notebook.
pip install notebook --upgradeor, for conda envs,
conda update -c conda-forge notebook
worked for me, thanks
for windows this is in
C:\Users\hp\AppData\Local\Programs\Python\Python38\Lib\site-packages\tornado\platform
Most helpful comment
Fixed by adding this code
in
python38/Lib/site-packages/tornado/platorm/asyncio.pyafter the main method.