Original Translation
62
Most Linux distributions include Python as a standard part of the system, so :file:`{prefix}` and :file:`{exec-prefix}` are usually both :file:`/usr` on Linux. If you build Python yourself on Linux (or any Unix-like system), the default :file:`{prefix}` and :file:`{exec-prefix}` are :file:`/usr/local`.
La plupart des distributions Linux incluent Python comme un élément de base du système, donc : file: `{prefix}` et : ​​file: `{exec-prefix}` sont généralement tous les deux : file: `/ usr` sous Linux. Si vous construisez vous-même Python sous Linux (ou tout autre système de type Unix), les valeurs par défaut de : file: `{prefix}` et: ​​file: `{exec-prefix}` sont souvent : file: `/ usr /` locales.
63
The default installation directory on Windows was :file:`C:\\Program Files\\Python` under Python 1.6a1, 1.5.2, and earlier.
Sous Windows, le dossier d'installation par défaut était : :file:`C:\Program Files\Python` sous Python 1.6a1, 1.5.2 et avant.
64
:file:`{prefix}` and :file:`{exec-prefix}` stand for the directories that Python is installed to, and where it finds its libraries at run-time. They are always the same under Windows, and very often the same under Unix and Mac OS X. You can find out what your Python installation uses for :file:`{prefix}` and :file:`{exec-prefix}` by running Python in interactive mode and typing a few simple commands. Under Unix, just type ``python`` at the shell prompt. Under Windows, choose :menuselection:`Start --> Programs --> Python X.Y --> Python (command line)`. Once the interpreter is started, you type Python code at the prompt. For example, on my Linux system, I type the three Python statements shown below, and get the output as shown, to find out my :file:`{prefix}` and :file:`{exec-prefix}`::
:file:`{prefix}` et :file:`{exec-prefix}` désignent les répertoires dans lesquels Python est installé et où il trouve les librairies lors de l'exécution. Ils sont toujours identiques sous Windows et très souvent les mêmes sous Unix et Mac OS X. Vous pouvez trouver ce que votre installation de Python utilise pour :file:`{prefix}` et :file:`{exec-prefix}` en exécutant Python en mode interactif et en tapant quelques commandes simples. Sous Unix, taper seulement ``python`` à l'invite du shell. Sous Windows, sélectionner :menuselection:`Démarrer --> Programmes --> Python X.Y --> Python (ligne de commande)`. Un fois l'interpréteur démarré, vous taper du code Python à l'invite de commande. Par exemple, sur mon système Linux, je tape les trois instructions ci-dessous et obtient la sortie comme indiqué pour trouver mes :file:`{prefix}` et :file:`{exec-prefix}`::
65
Python 2.4 (#26, Aug 7 2004, 17:19:02) Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.prefix '/usr' >>> sys.exec_prefix '/usr'
Python 2.4 (#26, Aug 7 2004, 17:19:02) Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.prefix '/usr' >>> sys.exec_prefix '/usr'
66
If you don't want to install modules to the standard location, or if you don't have permission to write there, then you need to read about alternate installations in section :ref:`inst-alt-install`. If you want to customize your installation directories more heavily, see section :ref:`inst-custom-install` on custom installations.
Si vous ne voulez pas installer des modules à l'emplacement standard, ou si vous n'avez pas la permission d'écrire là-bas, alors vous avez besoin de lire la section ref: `inst-alt-installer` sur les alternatives d'installation. Si vous souhaitez personnaliser vos répertoires d'installation plus fortement, allez voir la section ref: `inst-sur-install` sur les installations personnalisées.
67
Alternate Installation
68
Often, it is necessary or desirable to install modules to a location other than the standard location for third-party Python modules. For example, on a Unix system you might not have permission to write to the standard third-party module directory. Or you might wish to try out a module before making it a standard part of your local Python installation. This is especially true when upgrading a distribution already present: you want to make sure your existing base of scripts still works with the new version before actually upgrading.
69
The Distutils :command:`install` command is designed to make installing module distributions to an alternate location simple and painless. The basic idea is that you supply a base directory for the installation, and the :command:`install` command picks a set of directories (called an *installation scheme*) under this base directory in which to install files. The details differ across platforms, so read whichever of the following sections applies to you.
70
Alternate installation: the home scheme
71
The idea behind the "home scheme" is that you build and maintain a personal stash of Python modules. This scheme's name is derived from the idea of a "home" directory on Unix, since it's not unusual for a Unix user to make their home directory have a layout similar to :file:`/usr/` or :file:`/usr/local/`. This scheme can be used by anyone, regardless of the operating system their installing for.