[英]Jupyter Notebook doesn't open from cmd
I have python 3.6 installed, and I want to install jupyter notebook (not with anaconda, just jupyter notebook).我安装了 python 3.6,我想安装 jupyter notebook(不是 anaconda,只是 jupyter notebook)。 I run pip install notebook
, but when I write jupyter notebook
in cmd it gives an error.我运行pip install notebook
,但是当我在 cmd 中编写jupyter notebook
时出现错误。 I had done this previously with python 3.9 and it was working, but now I don't understand the problem.我以前用 python 3.9 做过这个,它工作正常,但现在我不明白这个问题。 Here is the error:这是错误:
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\user\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts\jupyter-notebook.EXE\__main__.py", line 4, in <module>
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\notebook\notebookapp.py", line 76, in <module>
from .base.handlers import Template404, RedirectWithParams
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\notebook\base\handlers.py", line 24, in <module>
import prometheus_client
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\__init__.py", line 3, in <module>
from . import (
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\gc_collector.py", line 43, in <module>
GC_COLLECTOR = GCCollector()
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\gc_collector.py", line 14, in init
registry.register(self)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\registry.py", line 26, in register
names = self._get_names(collector)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\registry.py", line 66, in _get_names
for metric in desc_func():
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\gc_collector.py", line 36, in collect
collected.add_metric([generation], value=stat['collected'])
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\prometheus_client\metrics_core.py", line 126, in add_metric
self.samples.append(Sample(self.name + '_total', dict(zip(self._labelnames, labels)), value, timestamp))
TypeError: new() missing 1 required positional argument: 'exemplar
I had the exact same problem while trying to run jupyter notebook with python3.6 .我在尝试使用python3.6运行 jupyter notebook 时遇到了完全相同的问题。 When I changed it to 3.7 worked just fine.当我将其更改为 3.7时工作正常。 Maybe there is an issue with python3.6 and jupyter's compatibility.可能python3.6和jupyter的兼容性有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.