====== Jupyter ====== **Sur Debian 10 Buster, installer jupyter avec les dépôts** ===== Jupyter ===== * Jupyter n'a rien à voir avec **[[https://fr.wikipedia.org/wiki/Jupiter|homonymie de Jupiter]]**. * **[[https://fr.wikipedia.org/wiki/Jupyter|Jupyter est une application web utilisée pour programmer dans plus de 40 langages de programmation, dont Python.]]** * **[[https://jupyter.org/|Project Jupyter]]** exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages. ===== Installation de jupyter ===== === Linux === sudo pip3 install jupyter ===Ré-installation=== sudo python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console notebook qtconsole nbconvert nbformat sudo pip3 install jupyter ===Bug debian 10 ?=== sudo apt install python3-ipykernel extrait .. Dépaquetage de python3-ipykernel (4.9.0-1) ... Paramétrage de python3-prompt-toolkit (1.0.15-1) ... Paramétrage de python3-tornado (5.1.1-4) ... Paramétrage de python3-ipython-genutils (0.2.0-1) ... Paramétrage de python3-zmq (17.1.2-2) ... Paramétrage de python3-pickleshare (0.7.5-1) ... Paramétrage de python3-traitlets (4.3.2-1) ... Paramétrage de python3-dateutil (2.7.3-3) ... Paramétrage de python3-simplegeneric (0.8.1-2) ... Paramétrage de python3-jupyter-core (4.4.0-2) ... Paramétrage de python3-ipython (5.8.0-1) ... Paramétrage de python3-jupyter-client (5.2.3-1) ... Paramétrage de python3-ipykernel (4.9.0-1) ... ==== Exécution ==== jupyter notebook ouvre un onglet dans votre navigateur Web, avec un navigateur de fichier ouvert sur votre home: {{ :media_10:jupyter_01.png?600 |}} =====Premier NoteBook===== Le notebook à coller, décompressé, dans le dossier Jupyter de votre home: {{:media_10:hello.ipynb.zip|hello.ipynb.zip}} Le fichier *.ipynb converti en python #!/usr/bin/env python # coding: utf-8 # # Hello World # Affichage de "Bonjour La Labomedia" # # Maj + Entrée ou clic sur Run # In[1]: print('Bonjour La Labomedia') # In[2]: for i in range(0, 2): print("Hi!") # In[4]: for i in range(5, 10): print("Hi!"), Après Exécution sur chaque bloc {{ :media_10:jupyter_02.png?800 |}} En dessous de chaque bloc, est affiché la sortie terminal du bloc. {{tag>python sb}}