Python 3.4 or greater
https://github.com/jupyterhub/jupyterhub
pip install --upgrade jupyterhub notebook
# With ssl
$ jupyterhub --ip 10.0.1.2 --port 443 --ssl-key my_ssl.key --ssl-cert my_ssl.cert
# Without ssl
$ jupyterhub --ip 10.0.1.2 --port 8000
Ref: https://www.alfredo.motta.name/create-isolated-jupyter-ipython-kernels-with-pyenv-and-virtualenv/
Make sure pyenv and the virtualenv wrapper for pyenv are working
$ pyenv local my_venv
$ pip install ipykernel
# Confirm jupyter is installed correctly
$ pip list | grep jupyter
jupyter-client (4.1.1)
jupyter-core (4.0.6)
$ jupyter --paths
config:
/home/elijahc/.jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/home/elijahc/.local/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/run/user/1000/jupyter
For global kernels for all users store them at /usr/local/share/jupyter or /usr/share/jupyter
Make a new directory for the new kernel
$ sudo mkdir -p /usr/local/share/jupyter/kernels/my_venv
Add the new kernel.json file
$ sudo touch /usr/local/share/jupyter/kernels/my_venv/kernel.json
kernel.json
$ cat kernel.json
{
"argv": [ "/home/elijahc/.pyenv/versions/my_venv/bin/python", "-m", "ipykernel",
"-f", "{connection_file}"],
"display_name": "my_venv",
"language": "python"
}
Ref: https://github.com/jupyterhub/jupyterhub/wiki/Run-jupyterhub-as-a-system-service