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.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
utilisateurs:hypathie:tutos:python-trucs-et-machins [29/12/2015 07:15] Hypathie [Installer Eric6 python] |
utilisateurs:hypathie:tutos:python-trucs-et-machins [29/12/2015 15:58] Hypathie [Un utilisateur python3] |
||
---|---|---|---|
Ligne 44: | Ligne 44: | ||
<code retour>Python 3.4.2</code> | <code retour>Python 3.4.2</code> | ||
- | ===== Installer Eric6 python===== | ||
+ | ====Changer de version de python avec update-alternatives ==== | ||
- | * D'abord on télécharge Eric6 : http://eric-ide.python-projects.org/eric-download.html | + | * Version actuelle pour tout le système : |
- | * Référence sur l'installation : https://github.com/davy39/eric | + | <code root>python --version</code> |
- | ====installation des dépendances==== | + | * Voir où son les exécutable des version de python installées sur le système : |
- | ===qt5=== | + | <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> | ||
- | <code root>apt-get update && apt-get install qt5-default</code> | + | * Ajouter les version de python disponible à update-alternatives : |
- | * A voir pour installer l'IDE qtcreator : http://famedsolutions.com/index.php/2015/05/02/installing-qt5-on-debian-jessie/ | + | <code root>update-alternatives --list python</code> |
+ | <code retour>update-alternatives: erreur: pas d'alternatives pour python</code> | ||
- | Depuis le site officiel : http://www.qt.io/download-open-source/#section-2 | ||
- | On télécharge la version correspondante à son système : | + | <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> | ||
- | {{http://pix.toile-libre.org/upload/original/1451369569.png}} | + | * Pour changer de version de python : |
- | ===qscintilla2=== | + | <code root>update-alternatives --config python</code> |
+ | On choisit la version 3. | ||
- | <code root>apt-get install python-qscintilla2</code> | + | <code root></code> |
- | ===sip=== | + | <code root></code> |
- | * Voir : http://pyqt.sourceforge.net/Docs/sip4/ | + | <code root></code> |
+ | <code root></code> | ||
+ | <code root></code> | ||
+ | <code root></code> | ||
+ | <code root></code> | ||
+ | ===== Installer Eric6 python===== | ||
- | <code user>wget http://netcologne.dl.sourceforge.net/project/pyqt/sip/sip-4.17/sip-4.17.tar.gz</code> | + | * Installation des paquets nécessaires : |
- | <code user>tar xzvf sip-4.17.tar.gz -C ~</code> | + | |
- | <code user>cd sip-4.17/</code> | + | |
- | <code user>python configure.py</code> | + | |
- | <code user>make</code> | + | |
- | <code root>make install</code> | + | |
+ | <code root>apt-get install mercurial build-essential qt5-default qtbase5-dev qttools5-dev-tools libqt5scintilla2-11 python3-pyqt5.qtwebkit python3-pyqt5.qtsvg python3-pyqt5.qtsql libqt5webkit5-dev python3-pyqt5.qtwebkit python-qscintilla2 python3-pyqt4.qsci python3-pyqt4.qtsql | ||
+ | </code> | ||
+ | * Installation de Qt : | ||
- | ===PyQt5=== | + | <code user>wget http://qt-mirror.dannhauer.de/archive/online_installers/2.0/qt-unified-linux-x64-2.0.2-2-online.run</code> |
- | * Voir : https://riverbankcomputing.com/software/pyqt/download5 | + | <code root>chmod a+x qt-unified-linux-x64-2.0.2-2-online.run</code> |
+ | <code root>./qt-unified-linux-x64-2.0.2-2-online.run</code> | ||
+ | <code user>export QTDIR=/opt/Qt/5.5/gcc_64/</code> | ||
+ | <code user>export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${QTDIR}/lib</code> | ||
+ | <code user>export PATH=${QTDIR}/bin:${PATH}</code> | ||
+ | <code user>ln -s /opt/Qt/5.5/gcc_64/bin/qmake</code> | ||
- | <code user>wget http://skylink.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.5.1/PyQt-gpl-5.5.1.tar.gz</code> | + | * Installation à neuf de sip : |
- | <code user>tar xzvf PyQt-gpl-5.5.1.tar.gz -C ~</code> | + | <code user>rm /usr/lib/python3/dist-packages/sip*</code> |
- | + | <code user>wget http://skylink.dl.sourceforge.net/project/pyqt/sip/sip-4.17/sip-4.17.tar.gz</code> | |
- | <code user>cd PyQt-gpl-5.5.1/</code> | + | <code user>tar -zxvf sip-4.17.tar.gz</code> |
- | <code user>python configure.py</code> | + | <code user>cd sip-4.17/</code> |
+ | <code user>python3 configure.py</code> | ||
<code user>make</code> | <code user>make</code> | ||
<code root>make install</code> | <code root>make install</code> | ||
+ | <code user>python3</code> | ||
+ | <code>>>> import sip</code> | ||
+ | <code>>>> print(sip.SIP_VERSION_STR)</code> | ||
+ | <code>>>> exit()</code> | ||
+ | <code user>wget http://netcologne.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.5.1/PyQt-gpl-5.5.1.tar.gz</code> | ||
+ | <code user>tar -zxvf PyQt-gpl-5.5.1.tar.gz</code> | ||
+ | <code user>cd PyQt-gpl-5.5.1/</code> | ||
+ | <code user>python3 configure.py</code> | ||
+ | <code user>make</code> | ||
+ | <code user>make install</code> | ||
+ | <code user>python3</code> | ||
+ | <code>>>> import PyQt5</code> | ||
+ | <code>>>> exit()</code> | ||
+ | <code root>ln -s /usr/lib/python3.4/site-packages/PyQt5 /usr/lib/python3.4/PyQt5</code> | ||
+ | <code root>ln -s /usr/lib/python3.4/site-packages/PyQt5 /usr/lib/python3/dist-packages/PyQt5</code> | ||
+ | <code user>python3 configure.py --destdir /usr/lib/python3.4</code> | ||
+ | * Installation de QScintilla : | ||
- | ====Installer Eric6 ==== | ||
- | * Pour obtenir la version 6 | + | <code user>cd ~/Bureau/</code> |
+ | <code user>wget http://netcologne.dl.sourceforge.net/project/pyqt/QScintilla2/QScintilla-2.9.1/QScintilla-gpl-2.9.1.tar.gz</code> | ||
+ | <code user> tar -xzvf QScintilla-gpl-2.9.1.tar.gz</code> | ||
+ | <code user>cd QScintilla-gpl-2.9.1/</code> | ||
+ | <code user>cd Qt4Qt5/</code> | ||
+ | <code user>qmake qscintilla.pro </code> | ||
+ | <code user>make</code> | ||
+ | <code root>make install</code> | ||
+ | <code user>cd ../designer-Qt4Qt5</code> | ||
+ | <code user>qmake designer.pro</code> | ||
+ | <code user>make</code> | ||
+ | <code root>make install</code> | ||
- | <code user>wget http://netix.dl.sourceforge.net/project/eric-ide/eric6/stable/6.1.0/eric6-6.1.0.tar.gz</code> | + | <code user>cd ../Python</code> |
- | + | <code user>python3 configure.py --pyqt=PyQt5</code> | |
- | + | <code user>make</code> | |
- | * On décompresse l'archive dans le répertoire courant | + | <code root>make install</code> |
- | + | ||
- | <code user>tar xzvf eric6-6.1.0.tar.gz -C ~</code> | + | |
+ | * Installation de eric6 : | ||
+ | <code user>cd ~/Bureau</code> | ||
+ | <code user>wget http://heanet.dl.sourceforge.net/project/eric-ide/eric6/stable/6.1.0/eric6-6.1.0.tar.gz</code> | ||
+ | <code user>tar -zxvf eric6-6.1.0.tar.gz</code> | ||
<code user>cd eric6-6.1.0/</code> | <code user>cd eric6-6.1.0/</code> | ||
+ | <code root>python3 install.py</code> | ||
+ | <code root>python3 install-i18n.py</code> | ||
- | <code user>chmod +x install.py</code> | + | <code user>chmod a+w -R ~/.eric6</code> |
- | + | <code user></code> | |
- | <code user>./install.py</code> | + | <code user></code> |
+ | <code user></code> | ||
+ | <code user></code> | ||
+ | <code user></code> | ||
+ | <code user></code> | ||
<code user></code> | <code user></code> | ||
- | |||
<code user></code> | <code user></code> | ||
===== Utilisation ===== | ===== Utilisation ===== | ||