Cannot open new Jupyter Notebook [Permission Denied]

前端 未结 19 2839
囚心锁ツ
囚心锁ツ 2020-12-08 10:18

I have installed Jupyter Notebook on ubuntu 16.04 using pip3. I can execute jupyter notebook command. It opens and shows a list of current path directories.

相关标签:
19条回答
  • 2020-12-08 10:28
    1. Open Anaconda prompt
    2. Go to C:\Users\your_name
    3. Write jupyter trust untitled.ipynb
    4. Then, write jupyter notebook
    0 讨论(0)
  • 2020-12-08 10:30

    In my opinion, it is a good practice to run Jupyter in a dedicated workbook folder.

    $ mkdir jupyter_folder
    $ jupyter-notebook --notebook-dir jupyter_folder
    

    where 'jupyter_folder' is a folder in my home.

    This method work without permission issue.

    0 讨论(0)
  • 2020-12-08 10:31

    The top answer here didn't quite fix the problem, although it's probably a necessary step:

    sudo chown -R user:user ~/.local/share/jupyter 
    

    (user should be whoever is the logged in user running the notebook server) This changes the folder owner to the user running the server, giving it full access.

    After doing this, the error message said it didn't have permission to create the checkpoint file in ~/.ipynb_checkpoints/ so I also changed ownership of that folder (which was previously root)

    sudo chown -R user:user ~/.ipynb_checkpoints/
    

    And then I was able to create and save a notebook!

    0 讨论(0)
  • 2020-12-08 10:34

    Executing the script below worked for me.

    sudo chown $USER /home/$USER/.jupyter
    
    0 讨论(0)
  • 2020-12-08 10:35

    I had the very same issue running Jupyter. After chasing my tail on permissions, I found that everything cleared up after I changed ownership on the directory where I was trying to run/store my notebooks. Ex.: I was running my files out of my ~/bash dir. That was root:root; when I changed it to jim:jim....no more errors.

    0 讨论(0)
  • 2020-12-08 10:36

    Try running "~/anaconda3/bin/jupyter notebook" instead of "jupyter notebook". This resolved the problem for me. No more getting 'permission denied' error.

    0 讨论(0)
提交回复
热议问题