After updating to Ubuntu 22.04, I am no longer able to access Jupyter Notebook

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: 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.

UPDATE: I am able to access the notebook now by using the URL printed to the console. 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.

1 Like

Noting that this is cross-posted at StackOverflow, see here for possibly more information and discussion.

1 Like