Jupyter笔记本权限被拒绝

时间:2018-04-14 10:44:23

标签: python macos jupyter-notebook

我最近搬到了Mac OS,并在我的驱动器上安装了Conda。我试图在我的用户文件中设置以避免根目录/必须使用'sudo'的问题。

Python似乎在Spyder中正常工作(包括所有Conda pkgs),当我通过终端运行时,jupyter笔记本也会启动。虽然当我尝试创建一个新的笔记本时,我已经提出了这个错误:

创建新笔记本时发生错误。 保存文件时出现意外错误:Udacity / DAND / Untitled.ipynb数据库已锁定

以下是错误代码:

nabeelsiddiqui ~ $ jupyter notebook
[I 20:39:04.428 NotebookApp] The port 8888 is already in use, trying another port.
[I 20:39:04.430 NotebookApp] The port 8889 is already in use, trying another port.
[I 20:39:04.581 NotebookApp] JupyterLab beta preview extension loaded from /Users/nabeelsiddiqui/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 20:39:04.581 NotebookApp] JupyterLab application directory is /Users/nabeelsiddiqui/anaconda3/share/jupyter/lab
[I 20:39:04.614 NotebookApp] Serving notebooks from local directory: /Users/nabeelsiddiqui
[I 20:39:04.614 NotebookApp] 0 active kernels
[I 20:39:04.615 NotebookApp] The Jupyter Notebook is running at:
[I 20:39:04.616 NotebookApp] http://localhost:8890/?token=a6e4ca7a8c79d0723d99e74c5da5c55b877f9b7ca7bc1695
[I 20:39:04.616 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 20:39:04.619 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8890/?token=a6e4ca7a8c79d0723d99e74c5da5c55b877f9b7ca7bc1695
[I 20:39:05.038 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 20:39:15.015 NotebookApp] Creating new notebook in /Udacity/DAND
[E 20:39:20.136 NotebookApp] Error while saving file: Udacity/DAND/Untitled.ipynb database is locked
    Traceback (most recent call last):
      File "/Users/nabeelsiddiqui/anaconda3/lib/python3.6/site-packages/notebook/services/contents/filemanager.py", line 455, in save
        self.check_and_sign(nb, path)
      File "/Users/nabeelsiddiqui/anaconda3/lib/python3.6/site-packages/notebook/services/contents/manager.py", line 486, in check_and_sign
        self.notary.sign(nb)
      File "/Users/nabeelsiddiqui/anaconda3/lib/python3.6/site-packages/nbformat/sign.py", line 449, in sign
        self.store.store_signature(signature, self.algorithm)
      File "/Users/nabeelsiddiqui/anaconda3/lib/python3.6/site-packages/nbformat/sign.py", line 207, in store_signature
        if not self.check_signature(digest, algorithm):
      File "/Users/nabeelsiddiqui/anaconda3/lib/python3.6/site-packages/nbformat/sign.py", line 239, in check_signature
        (datetime.utcnow(), algorithm, digest),
    sqlite3.OperationalError: database is locked
[W 20:39:20.157 NotebookApp] 500 POST /api/contents/Udacity/DAND (::1): Unexpected error while saving file: Udacity/DAND/Untitled.ipynb database is locked
[W 20:39:20.158 NotebookApp] Unexpected error while saving file: Udacity/DAND/Untitled.ipynb database is locked
[E 20:39:20.160 NotebookApp] {
      "Host": "localhost:8890",
      "Connection": "keep-alive",
      "Content-Length": "19",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "Origin": "http://localhost:8890",
      "X-Requested-With": "XMLHttpRequest",
      "X-Xsrftoken": "2|10ee5b83|0be383ee0a7c0b57100e37733a9ac184|1523002477",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36",
      "Content-Type": "application/json",
      "Referer": "http://localhost:8890/tree/Udacity/DAND",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-AU,en-GB;q=0.9,en-US;q=0.8,en;q=0.7",
      "Cookie": "_xsrf=2|10ee5b83|0be383ee0a7c0b57100e37733a9ac184|1523002477; username-localhost-8888=\"2|1:0|10:1523618508|23:username-localhost-8888|44:MWY5NmVjMzExZjcwNGRmNmJjN2FkYzdiYzg1MWQ2NzQ=|db4b51b1e42a18c620c3d91bcfc67b1f006bbc113bd002925c14563a176966e3\"; username-localhost-8889=\"2|1:0|10:1523700851|23:username-localhost-8889|44:OTZjZjA5YjE0NGJhNDU2ZThkMjlkMDdiNThiNWEyMDc=|3a812e400b1298d7621368d7f6b810856d0cc421dd1b3bc6e774dca2992b003c\"; username-localhost-8890=\"2|1:0|10:1523702345|23:username-localhost-8890|44:MmM2MWE2ZTlkZDIwNDMyMGI5YTZkM2JhYTliZDZhNjY=|cd49c39ae7cb7b400be786e81b4c4e7777e6f38840251cb85d335115cb94092b\""
    }
[E 20:39:20.161 NotebookApp] 500 POST /api/contents/Udacity/DAND (::1) 5147.72ms referer=http://localhost:8890/tree/Udacity/DAND

此处还有我的jupyter当前安装的路径:

 nabeelsiddiqui ~ $ jupyter --paths
    config:
        /Users/nabeelsiddiqui/.jupyter
        /Users/nabeelsiddiqui/anaconda3/etc/jupyter
        /usr/local/etc/jupyter
        /etc/jupyter
    data:
        /Users/nabeelsiddiqui/Library/Jupyter
        /Users/nabeelsiddiqui/anaconda3/share/jupyter
        /usr/local/share/jupyter
        /usr/share/jupyter
    runtime:
        /Users/nabeelsiddiqui/Library/Jupyter/runtime

0 个答案:

没有答案