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
and on reddit: https://www.reddit.com/r/learnpython/comments/uaipzo/i_just_updated_my_machine_to_ubuntu_2204_now_i/