Monday, April 29, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2595  / 2 Years ago, fri, april 8, 2022, 8:01:12

When I try to launch Jupyter Notebook, the browser (firefox) launches and I get the following error:


Access to the file was denied

The file at /home/benjamin/.local/share/jupyter/runtime/nbserver-11758-open.html is not readable.

It may have been removed, moved, or file permissions may be preventing access.

I tried running


jupyter lab clean --all
pip3 install jupyterlab --force-reinstall

as per the suggestion from here: https://stackoverflow.com/questions/70753768/jupyter-notebook-access-to-the-file-was-denied. The commands ran, but I still get the Access to the file was denied error. Also, on the reinstall command it spits this out:


ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spyder 4.2.5 requires pyqt5<5.13, which is not installed.
spyder 4.2.5 requires pyqtwebengine<5.13, which is not installed.
conda-repo-cli 1.0.4 requires pathlib, which is not installed.
anaconda-project 0.9.1 requires ruamel-yaml, which is not installed.
spyder 4.2.5 requires jedi==0.17.2, but you have jedi 0.18.1 which is incompatible.
spyder 4.2.5 requires parso==0.7.0, but you have parso 0.8.3 which is incompatible.
sphinx 4.0.1 requires Jinja2<3.0,>=2.3, but you have jinja2 3.1.1 which is incompatible.
sphinx 4.0.1 requires MarkupSafe<2.0, but you have markupsafe 2.1.1 which is incompatible.
python-language-server 0.36.2 requires jedi<0.18.0,>=0.17.2, but you have jedi 0.18.1 which is incompatible.
fermipy 1.0.1+5.g5a57 requires astropy<4, but you have astropy 4.2.1 which is incompatible.

Then, I tried to force update/reinstall the packages mentioned in the message (spyder and sphinx), and then reinstall jupyter notebook again, but I still get an error message which reads:


ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.conda-repo-cli 1.0.4 requires pathlib, which is not installed.anaconda-project 0.9.1 requires ruamel-yaml, which is not installed.spyder 5.3.0 requires ipython<8.0.0,>=7.31.1, but you have ipython 8.2.0 which is incompatible.spyder-kernels 2.3.0 requires ipython<8,>=7.31.1; python_version >= "3", but you have ipython 8.2.0 which is incompatible.python-language-server 0.36.2 requires jedi<0.18.0,>=0.17.2, but you have jedi 0.18.1 which is incompatible.pytest 6.2.3 requires pluggy<1.0.0a1,>=0.12, but you have pluggy 1.0.0 which is incompatible.fermipy 1.0.1+5.g5a57 requires astropy<4, but you have astropy 4.2.1 which is incompatible.

The last thing I tried was to set


c.NotebookApp.use_redirect_file = False

and uncomment that line in the file jupyter_notebook_configuration.py, but still the problem persists and I get the error “Access to the file was denied”


I am using Ubuntu 22.04. Does anyone know how to resolve this issue?


Edit:
Cross posted here: https://discourse.jupyter.org/t/after-updating-to-ubuntu-22-04-i-am-no-longer-able-to-access-jupyter-notebook/13991


here: https://stackoverflow.com/questions/71983770/just-updated-ubuntu-to-22-04-now-i-cant-open-jupyter-notebook


and on reddit: https://www.reddit.com/r/learnpython/comments/uaipzo/i_just_updated_my_machine_to_ubuntu_2204_now_i/


More From » package-management

 Answers
2

UPDATE: I am able to access the notebook now by using the URL printed to the console. (just copy and paste it into the Firefox browser)


I would still like to figure out how to get it to open with just the 'jupyter notebook" command the way it used to work before the update, but for now this is a useful workaround.


[#612] Saturday, April 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
neasinient

Total Points: 491
Total Questions: 120
Total Answers: 93

Location: The Bahamas
Member since Mon, Aug 2, 2021
3 Years ago
neasinient questions
Thu, Feb 16, 23, 10:28, 1 Year ago
Fri, Jun 4, 21, 08:14, 3 Years ago
Wed, Oct 13, 21, 21:37, 3 Years ago
Fri, Jun 17, 22, 01:12, 2 Years ago
;