Reputation: 21
I have just installed Python 3.9.1 and pip 21.0.1, but I can't make Jupyter Notebook to work. I can open it, but I can't create a new Python 3 Notebook (500: Internal Server Error). I have tried different solutions that were suggested on stackoverflow, but nothing seems to work. Could someone point me in the right direction of what's going wrong here?
[E 12:31:46.068 NotebookApp] Uncaught exception GET /notebooks/Untitled1.ipynb?kernel_name=python3 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Untitled1.ipynb?kernel_name=python3', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
result = await result
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tornado/gen.py", line 775, in run
yielded = self.gen.send(value)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/notebook/handlers.py", line 95, in get
self.write(self.render_template('notebook.html',
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/base/handlers.py", line 516, in render_template
return template.render(**ns)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
{% extends "page.html" %}
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/templates/page.html", line 154, in top-level template code
{% block header %}
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/templates/notebook.html", line 115, in block "header"
{% for exporter in get_frontend_exporters() %}
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/notebook/handlers.py", line 40, in get_frontend_exporters
for name in get_export_names():
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/base.py", line 141, in get_export_names
e = get_exporter(exporter_name)(config=config)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/base.py", line 102, in get_exporter
if getattr(exporter(config=config), 'enabled', True):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 325, in __init__
super().__init__(config=config, **kw)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/exporter.py", line 114, in __init__
self._init_preprocessors()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 491, in _init_preprocessors
conf = self._get_conf()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 509, in _get_conf
if conf_path.exists():
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1407, in exists
self.stat()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1221, in stat
return self._accessor.stat(self)
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbconvert/templates/conf.json'
[E 12:31:46.091 NotebookApp] {
"Host": "localhost:8888",
"Connection": "keep-alive",
"Sec-Ch-Ua": "\"Google Chrome\";v=\"87\", \" Not;A Brand\";v=\"99\", \"Chromium\";v=\"87\"",
"Sec-Ch-Ua-Mobile": "?0",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Dest": "document",
"Referer": "http://localhost:8888/tree",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Cookie": "_xsrf=2|85632aaa|64c82af63fd0966e14c03d95ba64a8a9|1612261353; username-localhost-8888=\"2|1:0|10:1612265499|23:username-localhost-8888|44:OTNlN2QxZGM3NTNiNDQwMDg5NmNkNjhlNmU4ODA4YTQ=|0d8e7a82c04f0bd92a53e19f819e7204c81853c25412c8bbb8f60e5e95ebccf2\""
}
[E 12:31:46.091 NotebookApp] 500 GET /notebooks/Untitled1.ipynb?kernel_name=python3 (::1) 262.630000ms referer=http://localhost:8888/tree
Thank you very much in advance.
Upvotes: 2
Views: 11725
Reputation: 53
use this command in conda promt:
conda install nbconvert=5.4.1
and downgrade torrnado to version 5
if the problem is not gone just update jupyter
conda update jupyter
it works for me
Upvotes: 2