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'
This question is related to
ubuntu
jupyter-notebook
In windows, I copied, what I think is a snapshot:
.~SomeAmazingNotebook.ipynb
renamed it:
SomeAmazingNotebook.ipynb
and could open it.
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.
I had to run chown recursively for all subfolders With /* . Than it worked:
sudo chown -R user:usergroup /home/user/.local/share/jupyter/*
It might be a trust issue.
Command-line
jupyter trust /path/to/notebook.ipynb
here is the documentation link :
http://jupyter-notebook.readthedocs.io/en/latest/security.html#security-in-notebook-documents
On a Windows machine run the python command prompt as administrator. That should resolved the permissions issue when creating a new python 3 notebook.
Try running "~/anaconda3/bin/jupyter notebook" instead of "jupyter notebook". This resolved the problem for me. No more getting 'permission denied' error.
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
(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.)
Executing the script below worked for me.
sudo chown $USER /home/$USER/.jupyter
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
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!
Seems like the problem is in the last release, so
pip install notebook==5.6.0
must solve the problem!
This worked for me:
-> uninstalled Jupyter
-> install jupyter in Python36 folder
-> open Jupyter from command prompt instead of git bash.
On Ubuntu, 'permission denied' may appear when browser is installed as a 'snap'. I had this problem. I edited config file to open a regular browser and it worked.
How to change the default browser used by the ipython/jupyter notebook in Linux?
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
None of the above worked for me but the below did:
sudo chown -R user: /Library/Frameworks/Python.framework/Versions/3.9/share/jupyter/
Where user is your username.
C:\Users\your_name
jupyter trust untitled.ipynb
jupyter notebook
I encountered same problem when I installed latest version of anaconda navigator 64 bit on windows 10.
I got to know that INSTALLING 32 BIT VERSION ON WINDOWS 10 will solve the issue. It worked for me. Jupyter is running smoothly now.
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.
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
pip3 install -U jupyter
jupyter notebook
all the issues or problems of premissions etc will be resolved.
Source: Stackoverflow.com