Outils pour utilisateurs

Outils du site


python:jupyter

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
python:jupyter [2022/03/13 15:59]
marclebrun créée
python:jupyter [2022/11/04 14:34] (Version actuelle)
marclebrun [Utilisation dans VSCode]
Ligne 1: Ligne 1:
 ====== Jupyter Notebook ====== ====== Jupyter Notebook ======
 +
 +  * [[https://​jupyter.org]]
  
 Vidéos : Vidéos :
-  * [[https://​www.youtube.com/​watch?​v=HW29067qVWk]] 
  
 +  * [[https://​www.youtube.com/​watch?​v=HW29067qVWk|Corey Schafer - Jupyter Notebook Tutorial: Introduction,​ Setup, and Walkthrough]]
  
-===== Installation =====+===== Installation ​sous Linux =====
  
 +Créer un environnement virtuel :
  
-Avec PIP :+<code bash> 
 +mkdir jupyter 
 +cd jupyter 
 + 
 +python3 -m venv venv 
 +. venv/​bin/​activate 
 +</​code>​ 
 + 
 +Installer Jupyter ​:
  
 <code python> <code python>
 pip install jupyter pip install jupyter
 </​code>​ </​code>​
 +
 +===== Installation sous Windows =====
 +
 +  * [[https://​jupyter.org/​install]]
 +
 +Créer un environnement virtuel :
 +
 +<code bash>
 +mkdir jupyter
 +cd jupyter
 +
 +python3 -m venv venv
 +. venv/​Scripts/​activate
 +</​code>​
 +
 +Installer Jupyter :
 +
 +<code python>
 +pip install jupyter
 +</​code>​
 +
 +> :!: **Erreur ** sous Python **32bits** => utiliser Python **64bits** évite ce problème :!:
 +>
 +> Cargo, the Rust package manager, is not installed or is not on PATH.
 +> This package requires Rust and Cargo to compile extensions. Install it through
 +> the system'​s package manager or via https://​rustup.rs/​
 +
 +===== Lancement du serveur local =====
 +
 +<code bash>
 +$ jupyter notebook
 +</​code>​
 +
 +===== Utilisation dans VSCode =====
 +
 +Source: [[https://​code.visualstudio.com/​docs/​datascience/​jupyter-notebooks]]
 +
 +Installer cette extension :
 +
 +{{:​python:​capture_d_ecran_2022-11-04_153350.jpg|}}
 +
 +Dans VSCode, ouvrir le dossier où l'on a créé l'​environnement virtuel.
 +
 +Taper ''​Shift+Ctrl+P''​ puis **Python: Select interpreter**,​ et sélectionner
 +celui qui se trouve dans l'​environnement virtuel local
 +=> **.\venv\Scripts\python.exe**
 +
 +{{:​python:​capture_d_ecran_2022-11-04_142616.jpg|}}
 +
 +Créer un fichier **.ipynb** dans le dossier.
  
  
python/jupyter.1647187198.txt.gz · Dernière modification: 2022/03/13 15:59 par marclebrun