Outils pour utilisateurs

Outils du site


python:jupyterlab

Différences

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

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
python:jupyterlab [2022/11/05 04:39]
marclebrun
python:jupyterlab [2022/11/05 06:01] (Version actuelle)
marclebrun [Firebird 2.5]
Ligne 18: Ligne 18:
  
 <code python> <code python>
-pip install jupyter-lab+pip install ​jupyterlab 
 +</​code>​ 
 + 
 +Lancement du serveur local : 
 + 
 +<code bash> 
 +jupyter lab
 </​code>​ </​code>​
  
 ===== Installation sous Windows ===== ===== Installation sous Windows =====
  
-===== Lancement du serveur local =====+Créer un environnement virtuel :
  
 <code bash> <code bash>
-$ jupyter-lab+mkdir jupyterlab 
 +cd jupyterlab 
 + 
 +python ​-m venv venv 
 +venv\scripts\activate
 </​code>​ </​code>​
 +
 +Installer JupyterLab :
 +
 +<code python>
 +pip install jupyterlab
 +</​code>​
 +
 +Lancement du serveur local :
 +
 +<code bash>
 +$ jupyter lab
 +</​code>​
 +
 +===== Accès à une Base de Données =====
 +
 +==== MySQL/​MariaDB ====
 +
 +<code bash>
 +pip install pymysql
 +pip install sqlalchemy
 +</​code>​
 +
 +==== Firebird 2.5 ====
 +
 +Installation :
 +
 +<code bash>
 +pip install fdb
 +pip install sqlalchemy
 +pip install sqlalchemy-firebird
 +pip install pandas
 +</​code>​
 +
 +Configuration :
 +
 +<code python>
 +host     = '​localhost'​
 +dbpath ​  = '/​path/​to/​my/​database.fdb' ​  # sous Windnows: '​c:/​path/​to/​my/​database.fdb'​
 +user     = '​sysdba'​
 +password = '​masterkey'​
 +dsn      = '​firebird://'​ + user + ':'​ + password + '​@'​ + host + '/'​ + dbpath
 +</​code>​
 +
 +Connexion :
 +
 +<code python>
 +import pandas as pd
 +
 +data = pd.read_sql_query("​select id, name from employees order by name;",​ con=dsn)
 +</​code>​
 +
 +==== Firebird 3.0+ ====
 +
 +(//... à venir ...//)
 +
  
python/jupyterlab.1667623151.txt.gz · Dernière modification: 2022/11/05 04:39 par marclebrun