Installation#
Install Python≥3.6 and pip:
$ sudo apt update $ sudo apt install python3 $ python3 -V Python 3.10.6 $ sudo apt install python3-pip
Create service user
jupyter
:$ sudo useradd -s /bin/bash -rmd /srv/jupyter jupyter
Switch to the service user
jupyter
:$ sudo -u jupyter -i
Install Pipenv:
$ python3 -m pip install --user pipenv
This installs Pipenv in
USER_BASE
.Determine
USER_BASE
and enter it inPATH
:$ python3 -m site --user-base /srv/jupyter/.local
Then the
bin
directory must be appended and added toPATH
in~/.profile
, so:export PATH=/srv/jupyter/.local/bin:$PATH
Finally, the changed profile is read in with:
$ source ~/.profile
Create a virtual environment and install JupyterHub:
$ mkdir jupyterhub_env $ cd jupyterhub_env $ pipenv install jupyterhub
Install
nodejs
andnpm
:$ sudo apt install nodejs npm $ node -v v12.22.9 $ npm -v 8.5.1
Install the HTTP proxy:
$ sudo npm install -g configurable-http-proxy
If JupyterLab and Notebook are to run in the same environment, they must also be installed here:
$ pipenv install jupyterlab notebook
Testing the installation:
$ pipenv run jupyterhub -h $ configurable-http-proxy -h
Starting the JupyterHub:
$ pipenv run jupyterhub ... [I 2019-07-31 22:47:26.617 JupyterHub app:1912] JupyterHub is now running at http://:8000
You can end the process again with ctrl-c.