简体   繁体   English

Jupyter Notebook删除扩展名后无法创建或打开文件

[英]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. 在尝试在Jupyter Notebook中添加和删除扩展名后,我无法再打开或创建新的python文档。

the browser shows: "500 : Internal Server Error" 浏览器显示:“ 500:内部服务器错误”

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. 我试图卸载并重新安装anaconda,但是还有另一个问题。 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. 我尝试使用conda安装anaconda-clean,anaconda-clean-y,rm -rf〜/ anaconda3,但是按照所有这些步骤操作之后,我检查了Macbook系统信息,anaconda仍然存在。

How can I get jupter notebook back to normal? 如何使Jupter笔记本电脑恢复正常?

Looks like jupyter_nbextensions_configurator is missing. 看起来jupyter_nbextensions_configurator丢失了。 Maybe try install it following instruction here https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator 也许尝试按照这里的说明安装它https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator

conda install -c conda-forge jupyter_nbextensions_configurator

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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