This is an old revision of the document!
authenticator
First we create a virtual environment under '/opt/jupyterhub'. Both jupyterlab and jupyterhub will be installed into this virtualenv
[root@jhub ~]# python3 -m venv /opt/jupyterhub/
now we have a virtual env for python3 in /opt/jupyterhub
[root@jhub ~]# ls /opt/jupyterhub/bin/ activate activate.csh activate.fish easy_install easy_install-3.6 pip pip3 pip3.6 python python3
this wheel package is hence installed in /opt
[root@jhub ~]# ls -ltr /opt/jupyterhub/lib/python3.6/site-packages total 36 -rw-r--r-- 1 root root 126 10 juil. 19:28 easy_install.py drwxr-xr-x 6 root root 4096 10 juil. 19:28 setuptools drwxr-xr-x 2 root root 4096 10 juil. 19:28 __pycache__ drwxr-xr-x 5 root root 4096 10 juil. 19:28 pkg_resources drwxr-xr-x 2 root root 4096 10 juil. 19:28 setuptools-39.2.0.dist-info drwxr-xr-x 11 root root 4096 10 juil. 19:28 pip drwxr-xr-x 2 root root 4096 10 juil. 19:28 pip-9.0.3.dist-info drwxr-xr-x 5 root root 4096 10 juil. 19:34 wheel drwxr-xr-x 2 root root 4096 10 juil. 19:34 wheel-0.36.2.dist-info
because of this warning
You are using pip version 9.0.3, however version 21.1.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [root@jhub ~]# /opt/jupyterhub/bin/python3 -m pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/47/ca/f0d790b6e18b3a6f3bd5e80c2ee4edbb5807286c21cdd0862ca933f751dd/pip-21.1.3-py3-none-any.whl (1.5MB) 100% |████████████████████████████████| 1.6MB 755kB/s Installing collected packages: pip Found existing installation: pip 9.0.3 Uninstalling pip-9.0.3: Successfully uninstalled pip-9.0.3 Successfully installed pip-21.1.3
[root@jhub ~]# /opt/jupyterhub/bin/python3 -m pip install jupyterhub jupyterlab Successfully installed Mako-1.1.4 SQLAlchemy-1.4.20 alembic-1.6.5 anyio-3.2.1 babel-2.9.1 certifi-2021.5.30 certipy-0.1.3 chardet-4.0.0 contextvars-2.4 cryptography-3.4.7 dataclasses-0.8 greenlet-1.1.0 idna-2.10 immutables-0.15 json5-0.9.6 jupyter-server-1.9.0 jupyter-telemetry-0.1.0 jupyterhub-1.4.1 jupyterlab-3.0.16 jupyterlab-server-2.6.1 nbclassic-0.3.1 oauthlib-3.1.1 pamela-1.0.0 pyopenssl-20.0.1 python-editor-1.0.4 python-json-logger-2.0.1 pytz-2021.1 requests-2.25.1 requests-unixsocket-0.2.0 ruamel.yaml-0.17.10 ruamel.yaml.clib-0.2.6 sniffio-1.2.0 urllib3-1.26.6 websocket-client-1.1.0
then also ipywidgets is installed in /opt because this is needed to allow connection between interactive tools running in the kernel and the user interface. other python scientific package can be installed in the traditional system paths
[root@jhub ~]# /opt/jupyterhub/bin/python3 -m pip install ipywidgets Successfully installed MarkupSafe-2.0.1 Send2Trash-1.7.1 argon2-cffi-20.1.0 async-generator-1.10 attrs-21.2.0 backcall-0.2.0 bleach-3.3.0 cffi-1.14.6 decorator-5.0.9 defusedxml-0.7.1 entrypoints-0.3 importlib-metadata-4.6.1 ipykernel-5.5.5 ipython-7.16.1 ipython-genutils-0.2.0 ipywidgets-7.6.3 jedi-0.18.0 jinja2-3.0.1 jsonschema-3.2.0 jupyter-client-6.2.0 jupyter-core-4.7.1 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.0 mistune-0.8.4 nbclient-0.5.3 nbconvert-6.0.7 nbformat-5.1.3 nest-asyncio-1.5.1 notebook-6.4.0 packaging-21.0 pandocfilters-1.4.3 parso-0.8.2 pexpect-4.8.0 pickleshare-0.7.5 prometheus-client-0.11.0 prompt-toolkit-3.0.19 ptyprocess-0.7.0 pycparser-2.20 pygments-2.9.0 pyparsing-2.4.7 pyrsistent-0.18.0 python-dateutil-2.8.1 pyzmq-22.1.0 six-1.16.0 terminado-0.10.1 testpath-0.5.0 tornado-6.1 traitlets-4.3.3 typing-extensions-3.10.0.0 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.5.1 zipp-3.5.0