Cannot open new Jupyter Notebook [Permission Denied]

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

    Based on my experience on Ubuntu 18.04:

    1. Check Jupyter installation

    first of all make sure that you have installed and/or upgraded Jupyter-notebook (also for virtual-environment):

    pip install --upgrade jupyter 
    

    2. Change the Access Permissions (Use with Caution!)

    then try to change the access permission for you

    sudo chmod -R 777 ~/.local
    

    where 777 is a three-digit representation of the access permission. In sense that each of the digits representing short format of the binary one (e.g. 7 for 111). So, 777 means that we set permission access to read, write and execute to 1 for all users (Owner, Group or Other)

    Example.1

    777 : 111 111 111

    or

    777 : rwx-rwx-rwx

    Example.2

    755 : 111 101 101

    • Owner: rwx=4+2+1=7
    • Group: r-x=4+0+1=5
    • Other: r-x=4+0+1=5

    (More about chmod : File Permissions and attributes)

    3. Run jupyter

    afterwards run your jupyter notebook:

    jupyter-notebook
    

    Note: (These steps also solve your Visual-Studio code (VS-Code) problems regarding permissions while using ipython and jupyter for python-interactive-console.)

提交回复
热议问题