jupyter笔记本没有运行

当我输入终端 py -m jupyter notebook 时出现此错误

Traceback (most recent call last):
  File "c:usersdosappdatalocalprogramspythonpython35-32librunpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:usersdosappdatalocalprogramspythonpython35-32librunpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:UsersDOsAppDataLocalProgramsPythonPython35-32Scriptsjupyter-notebook.EXE__main__.py", line 5, in <module>
  File "c:usersdosappdatalocalprogramspythonpython35-32libsite-packagesnotebooknotebookapp.py", line 81, in <module>
    from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
  File "c:usersdosappdatalocalprogramspythonpython35-32libsite-packagesnotebookserviceskernelskernelmanager.py", line 18, in <module>
    from jupyter_client.session import Session
  File "C:UsersDOsAppDataRoamingPythonPython35site-packagesjupyter_client__init__.py", line 6, in <module>
    from .asynchronous import AsyncKernelClient  # noqa
  File "C:UsersDOsAppDataRoamingPythonPython35site-packagesjupyter_clientasynchronous__init__.py", line 1, in <module>
    from .client import AsyncKernelClient  # noqa
  File "C:UsersDOsAppDataRoamingPythonPython35site-packagesjupyter_clientasynchronousclient.py", line 6, in <module>
    from jupyter_client.channels import HBChannel
  File "C:UsersDOsAppDataRoamingPythonPython35site-packagesjupyter_clientchannels.py", line 46
    time_to_dead: float = 1.0
                ^
SyntaxError: invalid syntax

这个错误的原因是什么?

回答

另一种方法是将 jupyter-client 版本降低到 6.1.12

你可以这样做

pip3 install --upgrade jupyter-client==6.1.12


以上是jupyter笔记本没有运行的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>