jupyter notebook not running

Viewed 1899

when i put in terminal py -m jupyter notebook i got this error

Traceback (most recent call last):
  File "c:\users\dos\appdata\local\programs\python\python35-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dos\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\DOs\AppData\Local\Programs\Python\Python35-32\Scripts\jupyter-notebook.EXE\__main__.py", line 5, in <module>
  File "c:\users\dos\appdata\local\programs\python\python35-32\lib\site-packages\notebook\notebookapp.py", line 81, in <module>
    from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
  File "c:\users\dos\appdata\local\programs\python\python35-32\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 18, in <module>
    from jupyter_client.session import Session
  File "C:\Users\DOs\AppData\Roaming\Python\Python35\site-packages\jupyter_client\__init__.py", line 6, in <module>
    from .asynchronous import AsyncKernelClient  # noqa
  File "C:\Users\DOs\AppData\Roaming\Python\Python35\site-packages\jupyter_client\asynchronous\__init__.py", line 1, in <module>
    from .client import AsyncKernelClient  # noqa
  File "C:\Users\DOs\AppData\Roaming\Python\Python35\site-packages\jupyter_client\asynchronous\client.py", line 6, in <module>
    from jupyter_client.channels import HBChannel
  File "C:\Users\DOs\AppData\Roaming\Python\Python35\site-packages\jupyter_client\channels.py", line 46
    time_to_dead: float = 1.0
                ^
SyntaxError: invalid syntax

what is the reason for this error?

2 Answers

Another way would it be to decrease jupyter-client version to 6.1.12

You can do that with

pip3 install --upgrade jupyter-client==6.1.12

The problem is that you have a lower version of python (i.e. 3.5.4), you must consider upgrading your python version equal to or higher than 3.6. This will solve your problem as the syntax is valid in this higher version and no more error will arise.

Related