[英]jupyter notebook not running
当我放入终端 py -m jupyter notebook 时出现此错误
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
这个错误的原因是什么?
另一种方法是将 jupyter-client 版本降低到 6.1.12
你可以这样做
pip3 install --upgrade jupyter-client==6.1.12
问题是您的 python 版本较低(即 3.5.4),您必须考虑升级您的 python 版本等于或高于 3.6。 这将解决您的问题,因为语法在此更高版本中有效,并且不会出现更多错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.