python - Jupyter notebook - OSError [Errno 2] 没有那个文件或目录

标签 python anaconda jupyter-notebook jupyter jupyter-irkernel

我必须安装 Jupyter 才能完成 Udacity 的项目。按照说明并运行 Jupyter 后,所有笔记本都无法打开。这是日志输出:

[W 06:54:04.215 NotebookApp] The signatures database cannot be opened; maybe it is corrupted or encrypted. You may need to rerun your notebooks to ensure that they are trusted to run Javascript. The old signatures database has been renamed to /home/aulon/.local/share/jupyter/nbsignatures.db.bak and a new one has been created.
[E 06:54:04.218 NotebookApp] Unhandled error in API request
    Traceback (most recent call last):
      File "/home/aulon/.local/lib/python2.7/site-packages/notebook/base/handlers.py", line 516, in wrapper
        result = yield gen.maybe_future(method(self, *args, **kwargs))
      File "/home/aulon/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
        value = future.result()
      File "/home/aulon/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
        raise_exc_info(self._exc_info)
      File "/home/aulon/.local/lib/python2.7/site-packages/tornado/gen.py", line 307, in wrapper
        yielded = next(result)
      File "/home/aulon/.local/lib/python2.7/site-packages/notebook/services/contents/handlers.py", line 124, in get
        path=path, type=type, format=format, content=content,
      File "/home/aulon/.local/lib/python2.7/site-packages/notebook/services/contents/filemanager.py", line 384, in get
        model = self._notebook_model(path, content=content)
      File "/home/aulon/.local/lib/python2.7/site-packages/notebook/services/contents/filemanager.py", line 344, in _notebook_model
        self.mark_trusted_cells(nb, path)
      File "/home/aulon/.local/lib/python2.7/site-packages/notebook/services/contents/manager.py", line 456, in mark_trusted_cells
        trusted = self.notary.check_signature(nb)
      File "/home/aulon/.local/lib/python2.7/site-packages/traitlets/traitlets.py", line 556, in __get__
        return self.get(obj, cls)
      File "/home/aulon/.local/lib/python2.7/site-packages/traitlets/traitlets.py", line 535, in get
        value = self._validate(obj, dynamic_default())
      File "/home/aulon/.local/lib/python2.7/site-packages/notebook/services/contents/manager.py", line 58, in _notary_default
        return sign.NotebookNotary(parent=self)
      File "/home/aulon/.local/lib/python2.7/site-packages/nbformat/sign.py", line 390, in __init__
        self.store = self.store_factory()
      File "/home/aulon/.local/lib/python2.7/site-packages/nbformat/sign.py", line 338, in factory
        return SQLiteSignatureStore(self.db_file)
      File "/home/aulon/.local/lib/python2.7/site-packages/nbformat/sign.py", line 147, in __init__
        self.db = self._connect_db(db_file)
      File "/home/aulon/.local/lib/python2.7/site-packages/nbformat/sign.py", line 171, in _connect_db
        os.rename(db_file, old_db_location)
    OSError: [Errno 2] No such file or directory
...

我用谷歌搜索并发现了一些类似的问题 hereherehere ,但没有成功。

我安装了Anaconda,还是一样的问题。

非常感谢任何帮助。

如果我无法解决这个问题,我该如何完全卸载与 jupyter 和 anaconda 相关的所有内容?我正在使用 Ubuntu 16.04。

否则,有没有其他方法可以在没有 jupyter 的情况下打开 python 笔记本?也许是 Spyder?

最佳答案

已解决!

这是一个权限错误。

点击链接 here如果您遇到同样的问题。

关于python - Jupyter notebook - OSError [Errno 2] 没有那个文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44823994/

相关文章:

python - 无法在 Jupyter Notebook (Chrome) 中打开 PDF 文件

python - 创建新环境后 Conda 不被识别为内部或外部

ubuntu - 如何修复 Xubuntu 中的spyder段错误?

python - 在 Github 上的 jupyter 笔记本的表中显示管道

python - Matlab中单引号(')的含义是什么,以及如何将其更改为python

python-3.x - 默认情况下,Anaconda(有时)在与 conda 不同的位置创建环境 - 它们不同步?

python-3.x - 当我运行 jupyter notebook 时,出现以下错误,有人可以帮助我吗?

python - Flask 应用程序分为模块的文件夹布局是什么?

python - 如何解析 HTML 表格,其行在 <tr> 标签下同时包含 <th> 和 <td> 标签?

python - scipy 的 cdist 与 Sympy 符号不兼容