-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can’t launch Jupyter notebook (PermissionError: [Errno 13] Permission denied) #7421
Comments
Thank you for opening this issue @gckoas! Would you be able to try updating the runtime directory to something outside of |
Thank you so much @RRosio, it worked! |
Thans for your reply! |
Hi, one of my students had a similar issue after changing the hard disk of her computer, problem pasted below: PermissionError: [Errno 13] Permission denied: 'C:\Users\Asus\AppData\Roaming\jupyter\runtime\jpserver-4344-open.html' I saw your post but not completely sure how to proceed to fix this, not really experienced with this. Any help is welcome, |
It looks like you're encountering a PermissionError when trying to start JupyterLab. This error typically occurs when the server does not have the necessary permissions to write to a specific directory or file. Here's how you can address this issue: Run as Administrator: Ensure you are running JupyterLab with administrative privileges. Right-click on your terminal or Anaconda Prompt and select "Run as administrator." Check Permissions: Verify the permissions of the C:\Users\admin\AppData\Roaming\jupyter\runtime directory. Ensure that the current user has write permissions to this directory. Change Runtime Directory: You can change the runtime directory to a location where you have write permissions by setting the JUPYTER_RUNTIME_DIR environment variable. Here's how you can do it: Open your terminal or Anaconda Prompt. Update Jupyter: Ensure that you have the latest version of JupyterLab and Jupyter Server installed. You can update them using: bash bash |
Just open the Application Once with Administrator Privilege and after that it will work fine. This worked for me. |
Thank you very much!!!
Best wishes
FER
…On Wed, Jul 31, 2024 at 11:54 AM Ahmed Abouraia ***@***.***> wrote:
It looks like you're encountering a PermissionError when trying to start
JupyterLab. This error typically occurs when the server does not have the
necessary permissions to write to a specific directory or file. Here's how
you can address this issue:
Run as Administrator: Ensure you are running JupyterLab with
administrative privileges. Right-click on your terminal or Anaconda Prompt
and select "Run as administrator."
Check Permissions: Verify the permissions of the
C:\Users\admin\AppData\Roaming\jupyter\runtime directory. Ensure that the
current user has write permissions to this directory.
Change Runtime Directory: You can change the runtime directory to a
location where you have write permissions by setting the
JUPYTER_RUNTIME_DIR environment variable. Here's how you can do it:
Open your terminal or Anaconda Prompt.
Set the environment variable:
bash
Copy code
set JUPYTER_RUNTIME_DIR=C:\path\to\writable\directory
Replace C:\path\to\writable\directory with a directory path where you have
write permissions.
Check Disk Space: Ensure that there is enough disk space available in the
directory where JupyterLab is trying to write the file.
Update Jupyter: Ensure that you have the latest version of JupyterLab and
Jupyter Server installed. You can update them using:
bash
Copy code
pip install --upgrade jupyterlab jupyter_server
Reinstall Jupyter: If the problem persists, consider uninstalling and
reinstalling JupyterLab:
bash
Copy code
pip uninstall jupyterlab jupyter_server
pip install jupyterlab
After trying these steps, attempt to start JupyterLab again. If you
continue to face issues, please let me know the exact steps you have tried,
and we can further troubleshoot.
—
Reply to this email directly, view it on GitHub
<#7421 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHZ472RANOYWMSIBCCBZWLDZPD3BFAVCNFSM6AAAAABKTDDBVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQG4YTKMZRGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
*Dr. Fernando J. Gomez*
CICTERRA-Centro de Investigaciones en Ciencias de la Tierra
Velez Sarsfield 1611, Piso 2, Of. 4, Ciudad Universitaria
Zip Code X5016GCA - Córdoba - Argentina
Phone 54-0351-5353800 (ext. 30232)
Cell Phone 54-351-5164603
Personal teaching and research website:
https://fernandojgomez.github.io/FernandoJGomez/
CICTERRA website: *http://cicterra.conicet.unc.edu.ar/
<http://cicterra.conicet.unc.edu.ar/>* ; email: ***@***.***
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
|
|
I also faced similar issue on Windows 11 - My Jupyter notebook wasn't launching, so I fixed it by giving administrator permissions to the Jupyter runtime folder. Here's how I did it: Search for 'Anaconda Navigator' in the taskbar and open its file location. Click on the 'Roaming' folder in the search bar. Open the 'jupyter' folder. Find the 'runtime' folder inside it. Right-click the 'runtime' folder, select 'Properties,' then go to the 'Security' tab. Click 'Edit,' and grant the folder 'Administrator' permissions. Click 'OK' to apply the changes. |
Thanks Usman, it worked for me. |
Thanks!. Worked for me as well |
Just for someone who is in the same situation after rearranging hard disk and find the prompt showing the same error,annnnd not able to find where the "runtime" folder is: |
Thanks Usman, was facing the same issue from a long time, The above trick worked. |
Thanks Usman |
Putting it out there that the setting the environment variable JUPYTER_RUNTIME_DIR still worked for me. |
I had the same issue. |
Worked for me too. Just in case you are a beginner like me, Just type %Appdata% in the address bar of the file explorer and hit enter. Go to the Jupyter folder. Delete the runtime folder inside the jupyter folder and create a new folder with a different name |
Ups, sadenly discovered rather simpler solution to the problem. When you attempt to open that 'runtime' folder here C:\Users\YourName\AppData\Roaming\jupyter with windows file explorer, it provides an option to open that folder with permanent access. You agree to that option, and the problem is solved. |
|
In the directory |
I am new and i cant launch Jupyter notebook. I am getting the following error>
[I 2024-07-09 10:12:43.731 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-07-09 10:12:43.739 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-07-09 10:12:43.746 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-07-09 10:12:43.753 ServerApp] notebook | extension was successfully linked.
[I 2024-07-09 10:12:44.134 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-07-09 10:12:44.181 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-07-09 10:12:44.185 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-07-09 10:12:44.185 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-07-09 10:12:44.189 LabApp] JupyterLab extension loaded from C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Lib\site-packages\jupyterlab
[I 2024-07-09 10:12:44.189 LabApp] JupyterLab application directory is C:\Users\gckoas\AppData\Local\Programs\Python\Python312\share\jupyter\lab
[I 2024-07-09 10:12:44.190 LabApp] Extension Manager is 'pypi'.
[I 2024-07-09 10:12:44.599 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-07-09 10:12:44.609 ServerApp] notebook | extension was successfully loaded.
[I 2024-07-09 10:12:44.610 ServerApp] The port 8888 is already in use, trying another port.
[I 2024-07-09 10:12:44.610 ServerApp] The port 8889 is already in use, trying another port.
[I 2024-07-09 10:12:44.611 ServerApp] Serving notebooks from local directory: C:\Users\gckoas
[I 2024-07-09 10:12:44.612 ServerApp] Jupyter Server 2.14.1 is running at:
[I 2024-07-09 10:12:44.612 ServerApp] http://localhost:8890/tree?token=8ef7c317aafd78768a2e3092c044bd65399d906a5a1c2704
[I 2024-07-09 10:12:44.612 ServerApp] http://127.0.0.1:8890/tree?token=8ef7c317aafd78768a2e3092c044bd65399d906a5a1c2704
[I 2024-07-09 10:12:44.612 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[E 2024-07-09 10:12:44.612 ServerApp] Failed to write server-info to C:\Users\gckoas\AppData\Roaming\jupyter\runtime\jpserver-14760.json: PermissionError(13, 'Permission denied')
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Scripts\jupyter-notebook.EXE_main.py", line 7, in
File "C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Lib\site-packages\jupyter_server\extension\application.py", line 623, in launch_instance
serverapp.start()
File "C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Lib\site-packages\jupyter_server\serverapp.py", line 3119, in start
self.start_app()
File "C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Lib\site-packages\jupyter_server\serverapp.py", line 3023, in start_app
self.write_browser_open_files()
File "C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Lib\site-packages\jupyter_server\serverapp.py", line 2890, in write_browser_open_files
self.write_browser_open_file()
File "C:\Users\gckoas\AppData\Local\Programs\Python\Python312\Lib\site-packages\jupyter_server\serverapp.py", line 2913, in write_browser_open_file
with open(self.browser_open_file, "w", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\Users\gckoas\AppData\Roaming\jupyter\runtime\jpserver-14760-open.html'
The text was updated successfully, but these errors were encountered: