简体   繁体   中英

Jupyter Notebook can't create or open a file after remove extension

After I tried to add and remove an extension in Jupyter Notebook, I can't open or create a new python document anymore.

the browser shows: "500 : Internal Server Error"

terminal shows (quite long, I only copied part of it which indicates an error):

...

[E 09:58:34.030 NotebookApp] Uncaught exception GET /notebooks/Untitled.ipynb?kernel_name=python3 (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Untitled.ipynb?kernel_name=python3', version='HTTP/1.1', remote_ip='::1', headers={'Host': 'localhost:8888', 'Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1', 'Dnt': '1', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Referer': 'http://localhost:8888/tree', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-US,en;q=0.9,en-GB;q=0.8', 'Cookie': '_xsrf=2|12adb47b|ce5fc3408dfb4c6ebe2db7346ab98bc7|1531888190; username-localhost-8892="2|1:0|10:1532062480|23:username-localhost-8892|44:NGIzZGQ3NmE4ZjM5NDMwZGIzNDhjODE5YWZmZTVhZmM=|2c000d68aefed941bf2c3bd53b3a927841c76c428a6a1eccd36a44fdaaec6f62"; username-localhost-8891="2|1:0|10:1532092613|23:username-localhost-8891|44:NGY3NDBlMTY3NmI3NDIzMzk0NGViMDA3ODgzOTdlNjM=|39b21d7e732e7717eab69f4ecedcc8365517ef21149a2739b49f977d24a29bb1"; username-localhost-8889="2|1:0|10:1532100753|23:username-localhost-8889|44:ZjYyOWI1ZGU3MTU5NDIyN2E4MmI5NjM2NDYzN2RiMjA=|6c086a8f55ac67abe92024058427b7fee35745cb74f5e7bf4a4926a406ff385f"; username-localhost-8890="2|1:0|10:1532101756|23:username-localhost-8890|44:MGZiZmZiMzZhZTcxNDY3Nzk0ZDFlYWYyZDYzMmIyM2U=|ce0e258c16d103508162befbe45b6279175704d8c04c7b7e00c1b6acdfa3f9de"; username-localhost-8888="2|1:0|10:1532138291|23:username-localhost-8888|44:NzJjMjJmYjk0NDhhNDNiOTkwYjU3YzNiNjNjYmMwMjE=|10c0445e0da773f487bd55e82a12c0207d8e44e08e5ead02075ac3686c431599"'})

...

File "/anaconda3/lib/python3.6/site-packages/jupyter_contrib_nbextensions/__init__.py", line 5, in <module>
        import jupyter_nbextensions_configurator
    ModuleNotFoundError: No module named 'jupyter_nbextensions_configurator'
[E 09:58:34.039 NotebookApp] {
      "Host": "localhost:8888",

...

I was trying to uninstall and reinstall anaconda, but there's another problem. I tried conda install anaconda-clean, anaconda-clean-y, rm -rf ~/anaconda3, but after followed all these steps, I checked my Macbook system information, anaconda's still there.

How can I get jupter notebook back to normal?

Looks like jupyter_nbextensions_configurator is missing. Maybe try install it following instruction here https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator

conda install -c conda-forge jupyter_nbextensions_configurator

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM