.. $Id: documentation.rst.in 14117 2011-05-11 08:12:37Z ycadour $

.. _python: http://www.python.org


############
Installation
############

==========
Sous linux
==========

--------------
python système
--------------

Python est souvent préinstallé sur les distributions linux.

L'interpréteur est directement accessible en tapant la commande **python** dans un interpréteur.

::

    artymon@kerouac:~$ python
    Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 

-----------------------
installation par paquet
-----------------------

L'installation d'une version est faite par la commande apt-get.

::

    sudo apt-get install pythonX.X

-----------------------
compilation des sources
-----------------------

Téléchargement et extraction

::

    wget http://www.python.org/ftp/python/X.X.X
    tar xjf Python-X.X.X.tar.bz2
    cd Python-X.X.X/

Option de configuration

::

    ./configure --help
    `configure' configures python X.X to adapt to many kinds of systems.
    
    Usage: ./configure [OPTION]... [VAR=VALUE]...
    
    ...
    
    Installation directories:
      --prefix=PREFIX         install architecture-independent files in PREFIX
                              [/usr/local]

    
    By default, `make install' will install all the files in
    `/usr/local/bin', `/usr/local/lib' etc.  You can specify
    an installation prefix other than `/usr/local' using `--prefix',
    for instance `--prefix=$HOME'.
    
Configure, make, make install

::

   ./configure --prefix=/home/artymon/pythons/pyXXX
   make
   make install
   
L'interpréteur est disponible dans /home/artymon/pythons/pyXXX/bin/python

============
Sous Windows
============

Des installateurs graphiques sont disponibles sur http://www.python.org

Une fois l'installation terminée l'interpréteur est disponible dans le menu *Programmes*


