Talk:JupyterNotebook: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
(Using JupyterLab interface when working with Python 3.9.)
(No difference)

Revision as of 20:08, 24 November 2021

As Python 3.9 is available on the clusters, when creating a Python virtual environment to work with Python 3.9 and following the instruction to install Jupyter Notebook, the traditional notebook interface seems no longer supported, e.g. it fails to launch a Jupyter Notebook server using the wrapper script notebook.sh, which is created in step 5 of the given instruction. However, the JupyerLab interface is supported, which is considered as "Jupyter’s Next-Generation Notebook Interface", and can be installed in the virtual environment with the command:

(jupyter_py3)_[name@server ~]$ pip install --no-index jupyterlab


Then the wrapper script that launches Jupyter Notebook with a JupyterLab interface can be created with the command:

(jupyter_py3)_[name@server ~]$ echo -e '#!/bin/bash\nunset XDG_RUNTIME_DIR\njupyter-lab --ip $(hostname -f) --no-browser' > $VIRTUAL_ENV/bin/notebook.sh