Modifications

Sauter à la navigation Sauter à la recherche
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{FEATHER-CHARGER-FICHIER-MICROPYTHON-NAV}}
 
{{FEATHER-CHARGER-FICHIER-MICROPYTHON-NAV}}
  −
{{traduction}}
      
== Installer Ampy ==
 
== Installer Ampy ==
Ligne 10 : Ligne 8 :  
'''Pour les utilisateurs Window''': vous aurez besoin d'installer Python. Durant l'installation, sélectionnez le ''checkbox'' permettant d'ajouter le répertoire d'installation de Python à votre PATH système.
 
'''Pour les utilisateurs Window''': vous aurez besoin d'installer Python. Durant l'installation, sélectionnez le ''checkbox'' permettant d'ajouter le répertoire d'installation de Python à votre PATH système.
   −
Once Python is avaialble on your system you can easily install ampy from the Python package index. If you're using '''Python 2.7.x''' open a terminal and run this command:
+
Une fois Python disponible sur votre système vous pouvez facilement installer ampy depuis ''Python package index''. Si vous utilisez '''Python 2.7.x''', ouvrez un terminal et exécutez la commande suivante:
    
  <nowiki>pip install adafruit-ampy</nowiki>
 
  <nowiki>pip install adafruit-ampy</nowiki>
   −
Note on some Linux and Mac OSX systems you might need to install as root with sudo:
+
Note: sur certains systèmes Linux et Mac OSX, vous pourriez avoir besoin d'installer le paquet en tant que root avec la commande sudo:
    
  <nowiki>sudo pip3 install adafruit-ampy</nowiki>
 
  <nowiki>sudo pip3 install adafruit-ampy</nowiki>
   −
Or if you'd like to use Python 3.x run the pip3 command instead (using sudo if necessary):
+
Ou si vous désirez utiliser Python 3.x, utilisez la commande pip3 à la place de pip (en utilisant sudo si nécessaire):
    
  <nowiki>pip3 install adafruit-ampy</nowiki>
 
  <nowiki>pip3 install adafruit-ampy</nowiki>
Ligne 24 : Ligne 22 :  
{{ADFImage|FEATHER-CHARGER-FICHIER-MICROPYTHON-AMPY-00.png}}
 
{{ADFImage|FEATHER-CHARGER-FICHIER-MICROPYTHON-AMPY-00.png}}
   −
Finally in some rare cases like Mac OSX with Homebrew and multiple Python versions installed you might need to use the pip2 command to explicitly install in Python 2.7.x:
+
Finalement, dans de rare cas tel que Mac OSX avec Homebrew et de multiples version de Python installés vous pourriez avoir besoin d'utiliser la commande pip2 pour installer explicitement le paquet dans Python 2.7.x:
    
  <nowiki>pip2 install adafruit-ampy</nowiki>
 
  <nowiki>pip2 install adafruit-ampy</nowiki>
   −
Make sure the pip command finishes without an error. If you see an error then go back and check you have python installed and are running it as root with sudo if necessary.
+
Verifiez que la commande pip finisse sa tâche sans erreur. Si vous constatez une erreur alors revenez en arrière, vérifiez l'installation de Python et exécutez vos opération en tant que ''root'' avec l'instruction {{fname|sudo}}.
   −
To check that ampy installed successfully run the following command to print its usage:
+
Pour verifier si ampy est correctement installé, exécutez simplement la commande suivante pour afficher le message d'aide de ampy:
    
  <nowiki>ampy --help</nowiki>
 
  <nowiki>ampy --help</nowiki>
Ligne 36 : Ligne 34 :  
{{ADFImage|FEATHER-CHARGER-FICHIER-MICROPYTHON-AMPY-01.png}}
 
{{ADFImage|FEATHER-CHARGER-FICHIER-MICROPYTHON-AMPY-01.png}}
   −
You should see usage information for the tool printed, like what commands it has and options for using them. If you see an error instead go back and carefully check the pip install command above succeeded, and that python is in your system path.
+
Vous devriez voir les informations d'utilisation affiché par l'outil ampy. Si vous constatez une erreur, revenez en arrière et vérifiez attentivement les commandes d'installation (et si Python est correctement mentionné dans votre PATH système).
    
== Installer depuis les sources ==
 
== Installer depuis les sources ==
 +
Vous pouvez facilement installer ampy depuis ses [https://github.com/adafruit/ampy sources disponibles sur GitHub] en quelques commandes.
   −
If you'd like to install ampy from its [https://github.com/adafruit/ampy source on GitHub] you can do so easily with a few commands.  If you followed the above steps to install from the Python package index this isn't necessary, but if you'd like the current code or are perhaps modifying it then you'll want to install from source.
+
{{ambox|text=Si vous avez installez ampy depuis ''Python package index'' avec l'outil {{fname|pip}} alors ce point n'est pas nécessaire}}
   −
First [https://github.com/adafruit/ampy/archive/master.zip download the source] or use the git tool to clone it from GitHub:
+
Si, par contre, vous désirez disposer du code source pour pouvoir le modifier alors vous aurez besoin d'installer ampy depuis les sources.
 +
 
 +
Pour commencer: [https://github.com/adafruit/ampy/archive/master.zip téléchargez les source] ou utilisez l'outil {{fname|git}} pour cloner les sources depuis GitHub:
    
  <nowiki>git clone https://github.com/adafruit/ampy.git</nowiki>
 
  <nowiki>git clone https://github.com/adafruit/ampy.git</nowiki>
   −
Then in a terminal navigate to the directory with the cloned or extracted source and run the following command to install with ''''Python 2.7.x''':
+
Ensuite: utilisez un terminal pour naviguer dans le répertoire contenant les sources clonées (ou extraite de l'archive) et exécutez la commande suivante pour installer les sources avec ''''Python 2.7.x''':
    
  <nowiki>python setup.py install</nowiki>
 
  <nowiki>python setup.py install</nowiki>
   −
Note on some Linux and Mac OSX machines you might need to run as root with sudo:
+
Note: Quelques machines Linux et Mac OSX pourrait nécessiter l'exécution en tant qu'utilisateur ''root'' avec {{fname|sudo}}:
    
  <nowiki>sudo python setup.py install</nowiki>
 
  <nowiki>sudo python setup.py install</nowiki>
   −
Or to install for Python 3.x use the python3 command (using sudo when necessary too):
+
Ou pour installer les sources avec Python 3.x, utilisez la commande python3 (avec {{fname|sudo}} si nécessaire):
    
  <nowiki>python3 setup.py install</nowiki>
 
  <nowiki>python3 setup.py install</nowiki>
Ligne 60 : Ligne 61 :  
{{ADFImage|FEATHER-CHARGER-FICHIER-MICROPYTHON-AMPY-02.png}}
 
{{ADFImage|FEATHER-CHARGER-FICHIER-MICROPYTHON-AMPY-02.png}}
   −
Carefully inspect the output of the command to make sure it finished without an error or exception.  You should see something like 'Finished processing dependencies for adafruit-ampy...' as the last line. Once installed in this way the ampy tool should be available in your path just like if installed from the Python package index.
+
Inspectez attentivement le résultat, l'exécution de la commande doit s'achever sans erreur (ou exception)Vous devriez voir quelque-chose comme 'Finished processing dependencies for adafruit-ampy...' comme dernière ligne. Une fois installé de cette façon, ampy devrait être disponible dans votre PATH comme s'il était installé depuis ''Python package index'' (avec l'outil pip).
 +
 
 +
Une dernière option d'installation consiste à '''installer ampy en mode développeur''' (aussi dit "''develop''"). Cette façon de cloner / télécharger le code sera celui vraiment exécuté par Python à la place de copier et installer le code du module dans le cache interne de Python.  C'est vraiment très pratique si vous travaillez ou personnaliser le code (et voir vos modifications immédiatement appliquées).  
   −
One final way to install ampy from source is in '''develop''' mode, this way the cloned / downloaded code will actually be the code Python runs instead of copying and installing it into an internal Python module cache.  This is handy if you're working on the code and want to see your changes immediately updated.  To install in develop mode just run the setup.py command above but change '''install''' to '''develop'''.
+
Pour installer en mode développeur, exécutez simplement la commande {{fname|setup.py}} et remplacez le paramètre '''install''' par '''develop'''.
   −
Also note on Python 2.7.x if you plan to run the unit tests in the source code you will need the mock module installed:
+
Si vous planifiez l'exécution des test unitaires sur Python 2.7.x alors il sera également nécessaire d'installer le module mock :
    
  <nowiki>pip install mock</nowiki>
 
  <nowiki>pip install mock</nowiki>
    
{{FEATHER-CHARGER-FICHIER-MICROPYTHON-TRAILER}}
 
{{FEATHER-CHARGER-FICHIER-MICROPYTHON-TRAILER}}
29 917

modifications

Menu de navigation