Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
utilisateurs:hypathie:tutos:python-trucs-et-machins [28/12/2015 08:17] Hypathie créée |
utilisateurs:hypathie:tutos:python-trucs-et-machins [30/12/2015 10:34] Hypathie [Installer Eric python IDE] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== TPython trucs et machins ====== | + | ====== Python trucs et machins ====== |
* Objet : du tuto FIXME | * Objet : du tuto FIXME | ||
Ligne 44: | Ligne 44: | ||
<code retour>Python 3.4.2</code> | <code retour>Python 3.4.2</code> | ||
- | ===== Installation ===== | ||
+ | ====Changer de version de python avec update-alternatives ==== | ||
+ | |||
+ | * Version actuelle pour tout le système : | ||
+ | |||
+ | <code root>python --version</code> | ||
+ | |||
+ | * Voir où son les exécutable des version de python installées sur le système : | ||
+ | |||
+ | <code root>ls /usr/bin/python*</code> | ||
+ | <code retour>/usr/bin/python /usr/bin/python2.7 /usr/bin/python3.4 /usr/bin/python3m | ||
+ | /usr/bin/python2 /usr/bin/python3 /usr/bin/python3.4m | ||
+ | </code> | ||
+ | |||
+ | * Ajouter les version de python disponible à update-alternatives : | ||
+ | |||
+ | <code root>update-alternatives --list python</code> | ||
+ | <code retour>update-alternatives: erreur: pas d'alternatives pour python</code> | ||
+ | |||
+ | |||
+ | <code root>update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1</code> | ||
+ | <code root>update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2</code> | ||
+ | |||
+ | * Pour changer de version de python : | ||
+ | |||
+ | <code root>update-alternatives --config python</code> | ||
+ | On choisit la version 3. | ||
+ | |||
+ | ===== Installer Eric python IDE===== | ||
+ | |||
+ | ====Installation simple de Eric5 depuis les sources==== | ||
+ | |||
+ | |||
+ | |||
+ | 1) On vérifie que le système est sous python2 (voir ci-dessus) | ||
+ | |||
+ | 2) On installe depuis les sources | ||
+ | <code root>apt-get install eric</code> | ||
+ | (cela installe aussi le paquet ''eric-api-files'' | ||
+ | |||
+ | * Désinstaller Eric installé depuis les sources : | ||
+ | <code root>apt-get remove eric</code> | ||
+ | |||
+ | ====Installer Eric6 ==== | ||
+ | |||
+ | === Installer les dépendances depuis les dépôts=== | ||
+ | |||
+ | <code root> | ||
+ | apt-get install python3-pyqt5 python3-pyqt5-dbg python3-pyqt4.qsci python3-pyqt5.qtx11extras python3-pyqt5.qtsql python3-pyqt5.qtsql-dbg python3-pyqt5.qtx11extras-dbg python3-pyqt5.qsci python3-pyqt5.qsci-dbg python-pyqt5.qtsvg python3-pyqt5.qtsvg-dbg python-pyqt5.qtwebkit python-pyqt5.qtwebkit-db python3-pyqt5.qtwebkit python3-pyqt5.qtwebkit-dbg | ||
+ | </code> | ||
+ | |||
+ | ===Installer eric6=== | ||
+ | |||
+ | * On créer un dossier d'installation dans le répertoire courant de l'utilisateur : | ||
+ | |||
+ | <code user>mkdir Eric6Install && cd Eric6Install</code> | ||
+ | |||
+ | * On télécharge Eric6 | ||
+ | <code user>wget http://heanet.dl.sourceforge.net/project/eric-ide/eric6/stable/6.1.0/eric6-6.1.0.tar.gz</code> | ||
+ | |||
+ | * On décompresse le dossier téléchargé : | ||
+ | |||
+ | <code user>tar -zxvf eric6-6.1.0.tar.gz</code> | ||
+ | |||
+ | * On se déplace dans le dossier décompressé : | ||
+ | |||
+ | <code user>cd eric6-6.1.0/</code> | ||
+ | |||
+ | * On lance l'installation de eric6 : | ||
+ | |||
+ | <code root>python3 install.py</code> | ||
+ | |||
+ | * Si toutes les dépendances ont bien été installée on a le retour : | ||
+ | <code>Checking dependencies | ||
+ | Python Version: 3.4.2 | ||
+ | Found PyQt5 | ||
+ | Found QScintilla2 | ||
+ | Found QtGui | ||
+ | Found QtNetwork | ||
+ | Found QtPrintSupport | ||
+ | Found QtSql | ||
+ | Found QtSvg | ||
+ | Found QtWebKit | ||
+ | Found QtWebKitWidgets | ||
+ | Found QtWidgets | ||
+ | Qt Version: 5.3.2 | ||
+ | sip Version: 4.16.4 | ||
+ | PyQt Version: 5.3.2 | ||
+ | QScintilla Version: 2.8.4 | ||
+ | All dependencies ok. | ||
+ | |||
+ | Cleaning up old installation ... | ||
+ | |||
+ | Creating configuration file ... | ||
+ | |||
+ | Compiling user interface files ... | ||
+ | |||
+ | Compiling source files ... | ||
+ | |||
+ | Installing eric6 ... | ||
+ | |||
+ | Installation complete.</code> | ||
+ | |||
+ | * On peut déjà lancer Eric6 en tant que root | ||
+ | <code root>eric6</code> | ||
+ | |||
+ | {{http://pix.toile-libre.org/upload/original/1451467749.png?500}} | ||
===== Utilisation ===== | ===== Utilisation ===== | ||