Installation#
Python≥3.5 und pip installieren:
# apt-get update # apt install python3 # python3 -V Python 3.7.3 # apt install python3-pip
Service-User
jupyter
erstellen:# useradd -s /bin/bash -rmd /srv/jupyter jupyter
Als Service-User
jupyter
das Repository klonen:# su - jupyter $ git clone https://github.com/veit/jupyter-tutorial.git
Pipenv installieren:
$ python3 -m pip install --user pipenv
Dies installiert Pipenv in
USER_BASE
.USER_BASE
ermitteln und inPATH
eintragen:$ python3 -m site --user-base /srv/jupyter/.local
Anschließend muss noch das
bin
-Verzeichnis angehängt und zuPATH
in~/.profile
hinzugefügt werden, also:export PATH=/srv/jupyter/.local/bin:$PATH
Schließlich wird das geänderte Profil eingelesen mit:
$ source ~/.profile
Virtuelle Umgebung erstellen und JupyterHub installieren:
$ cd jupyter-tutorial/ $ pipenv install
nodejs
undnpm
installieren:# apt install curl # cd ~ # curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh # bash nodesource_setup.sh # apt install nodejs # nodejs -v v10.15.3 # npm -v 6.10.2
10.x
gibt dabei die Major-Version vonnodejs
an.Installieren der
npm
-Pakete:# npm install
Installieren des HTTP-Proxy:
# npm install -g configurable-http-proxy /usr/local/bin/configurable-http-proxy -> /usr/local/lib/node_modules/configurable-http-proxy/bin/configurable-http-proxy + configurable-http-proxy@4.1.0 added 47 packages from 62 contributors in 6.208s
Testen der Installation:
$ pipenv run jupyterhub … [I 2019-07-31 22:47:26.617 JupyterHub app:1912] JupyterHub is now running at http://:8000
Mit ctrl-c könnt ihr den Prozess wieder beenden.