Fails to start on Python 3.10 (deadsneaks distro/ Ubuntu 20.4)
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
jupyter notebook does not start with Python 3.10
**To Reproduce**
install python 3.10 from deadsneaks repo
install jupyter
start jupyter notebook
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
(demo310-N7F4eE9V-py3.10) x@x:~/demo310$ jupyter notebook
Traceback (most recent call last):
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/bin/jupyter-notebook", line 8, in
sys.exit(main())
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/lib/python3.10/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/lib/python3.10/site-packages/traitlets/config/application.py", line 845, in launch_instance
app.initialize(argv)
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/lib/python3.10/site-packages/traitlets/config/application.py", line 88, in inner
return method(app, *args, **kwargs)
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/lib/python3.10/site-packages/notebook/notebookapp.py", line 2141, in initialize
self._init_asyncio_patch()
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/lib/python3.10/site-packages/notebook/notebookapp.py", line 2117, in _init_asyncio_patch
nest_asyncio.apply()
File "/home/x/.cache/pypoetry/virtualenvs/demo310-N7F4eE9V-py3.10/lib/python3.10/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
**Desktop (please complete the following information):**
- OS: ubuntu
- Version 20.4 LTS
**Additional context**
Package Version
------------------- -------
argon2-cffi 21.1.0
attrs 21.2.0
backcall 0.2.0
bleach 4.1.0
cffi 1.15.0
debugpy 1.5.1
decorator 5.1.0
defusedxml 0.7.1
entrypoints 0.3
ipykernel 6.6.0
ipython 7.30.0
ipython-genutils 0.2.0
ipywidgets 7.6.5
jedi 0.18.1
Jinja2 3.0.3
jsonschema 4.2.1
jupyter 1.0.0
jupyter-client 7.1.0
jupyter-console 6.4.0
jupyter-core 4.9.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.2
MarkupSafe 2.0.1
matplotlib-inline 0.1.3
mistune 0.8.4
nbclient 0.5.9
nbconvert 6.3.0
nbformat 5.1.3
nest-asyncio 1.5.2
notebook 6.4.6
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pip 21.3.1
prometheus-client 0.12.0
prompt-toolkit 3.0.23
ptyprocess 0.7.0
pycparser 2.21
Pygments 2.10.0
pyparsing 3.0.6
pyrsistent 0.18.0
python-dateutil 2.8.2
pyzmq 22.3.0
qtconsole 5.2.1
QtPy 1.11.2
Send2Trash 1.8.0
setuptools 58.3.0
six 1.16.0
terminado 0.12.1
testpath 0.5.0
tornado 6.1
traitlets 5.1.1
wcwidth 0.2.5
webencodings 0.5.1
wheel 0.37.0
widgetsnbextension 3.5.2
Contributor guide
Research direction
Reproduce the failure on Ubuntu 20.04 with Python 3.10 and the listed package versions, then start at notebook/notebookapp.py:2117-2141 and the nest_asyncio.py apply call shown in the traceback. Trace why the event loop is None and verify that jupyter notebook starts successfully after the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100