Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start jupyter notebook : ValueError

I tried to install jupyter notebook with

pip install jupyter

Running jupyter notebook returns the following error :

  File "/home/usernumber/.local/bin/jupyter-notebook", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/jupyter_core/application.py", line 270, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 845, in launch_instance
    app.initialize(argv)
  File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 88, in inner
    return method(app, *args, **kwargs)
  File "/home/usernumber/.local/lib/python3.8/site-packages/notebook/notebookapp.py", line 2141, in initialize
    self._init_asyncio_patch()
  File "/home/usernumber/.local/lib/python3.8/site-packages/notebook/notebookapp.py", line 2117, in _init_asyncio_patch
    nest_asyncio.apply()
  File "/home/usernumber/.local/lib/python3.8/site-packages/nest_asyncio.py", line 14, in apply
    raise ValueError('Can\'t patch loop of type %s' % type(loop))
ValueError: Can't patch loop of type <class 'NoneType'>

I am using Linux Mint 20.2 and Python 3.8.

How can I get jupyter notebook to start?

like image 909
usernumber Avatar asked Sep 02 '25 06:09

usernumber


1 Answers

pip install nest_asyncio==1.5.3 https://github.com/erdewit/nest_asyncio/issues/62

like image 84
dan Avatar answered Sep 04 '25 23:09

dan