pythonjupyter-notebookjupyter

Cannot Run Jupyter Notebook on Terminal


for my homework we need to use jupyter notebook to run an .ipynb file. I use Mac and I used pip install jupyter to install it using terminal, which was successful. However when I tried to open it using the commandjupter notebook I get this error. Any ideas? Thanks. error

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/jupyter-notebook", line 5, in <module>
    from notebook.notebookapp import main
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notebook/notebookapp.py", line 76, in <module>
    from .base.handlers import Template404, RedirectWithParams
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/notebook/base/handlers.py", line 24, in <module>
    import prometheus_client
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prometheus_client/__init__.py", line 3, in <module>
    from . import (
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prometheus_client/gc_collector.py", line 43, in <module>
    GC_COLLECTOR = GCCollector()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prometheus_client/gc_collector.py", line 14, in __init__
    registry.register(self)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prometheus_client/registry.py", line 26, in register
    names = self._get_names(collector)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prometheus_client/registry.py", line 66, in _get_names
    for metric in desc_func():
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prometheus_client/gc_collector.py", line 36, in collect
    collected.add_metric([generation], value=stat['collected'])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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'

Solution

  • The correct answer is actually what came out in the comments, I'll report it here for future viewers:

    pip install jupyter
    pip install notebook
    jupyter-notebook your-file.ipynb
    

    See you!