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.
But I cannot create a new notebook(Python3). It says
Unexpected error while saving file: Deep Learning/NN/Untitled.ipynb [Errno 13] Permission denied: '/home/ubuntu/.local/share/jupyter/notebook_secret'
You can set access control for Jupyter notebooks at the account level and at the object level. This feature is available in the latest version of Jupyter Notebooks. If you are not using the latest version of Jupyter notebooks, you can enable this feature from the Control Panel >> Account Features page.
The PermissionError: [errno 13] permission denied error occurs when you try to access a file from Python without having the necessary permissions. To fix this error, use the chmod or chown command to change the permissions of the file so that the right user and/or group can access the file.
Jupyter fails to start If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command jupyter notebook . If it can't find jupyter , you may need to configure your PATH environment variable.
Once you've entered your specific folder with Windows Explorer, you can simply press ALT + D, type in cmd and press Enter. You can then type jupyter notebook to launch Jupyter Notebook within that specific folder.
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.
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 works without any permission issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With