Cannot open new Jupyter Notebook [Permission Denied]

前端 未结 19 2842
囚心锁ツ
囚心锁ツ 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:37

    change the ownership of the ~/.local/share/jupyter directory from root to user.

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

    see here: https://github.com/ipython/ipython/issues/8997

    The first user before the colon is your username, the second user after the colon is your group. If you get chown: [user]: illegal group name, find your group with groups, or specify no group with sudo chown user: ~/.local/share/jupyter.

    EDIT: Added -R option in comments to the answer. You have to change ownership of all files inside this directory (or inside ~/.jupyter/, wherever it gives you PermissionError) to your user to make it work.

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

    This worked for me:

    -> uninstalled Jupyter
    -> install jupyter in Python36 folder
    -> open Jupyter from command prompt instead of git bash.
    
    0 讨论(0)
  • 2020-12-08 10:44

    Tried everything that was suggested but finally this helped me:

    sudo jupyter notebook --allow-root
    

    In my case, it didn't start the browser by itself. So just copy the link from terminal and open it by yourself.

    Update: Change folder(.local) permissions by this command:

    sudo chmod -R 777 .local
    
    0 讨论(0)
  • 2020-12-08 10:45

    I had to run chown recursively for all subfolders With /* . Than it worked:

    sudo chown -R user:usergroup /home/user/.local/share/jupyter/*
    
    0 讨论(0)
  • 2020-12-08 10:45

    You don't have to install or uninstall anything. if you are using python 2 use pip to install and upgrade. But if you want to use python3 then follow the steps below:

    sudo apt-get install python3-pip python3-dev
    

    then in terminal use this

    pip3 install -U jupyter
    

    final step is to launch jupyter notebook so,in terminal just type

    jupyter notebook
    

    all the issues or problems of premissions etc will be resolved.

    0 讨论(0)
  • 2020-12-08 10:45
    • List item
    • List item

    this problem of not able to open jupyter notebook is like Corona virus.I came across several complaints-including my own.I use windows 10.

    Atlast after struggling for 3 days i came across this wonderful foolproof solution:-

    1.The jupyter folder is created at path:- C:\Users\deviv_000\AppData\Roaming\jupyter your name will replace->deviv_000

    2.Go to cmd and write : cd C:\Users\deviv_000\AppData\Roaming\jupyter this will take cmd to that folder.

    3.Now create manually a file as untitled.ipynb in jupyter folder.

    4.Come back to cmd and write: jupyter trust untitled.ipynb

    5.After cmd performs this operation now write:-
    jupyter notebook

    SUCCESS!!- your notebook will appear in the next tab.I used chrome.
    

    Regards

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