Manual:Pywikibot/Installation/es

Para instalar o actualizar compat ve Manual:Pywikibot/installation/compat, Para actualizar o instalar vía SVN ve Manual:Pywikibot/installation/SVN.

Configuración inicial
Hay cuatro pasos básicos para instalar pywikibot:
 * 1) Descargar o actualizar Python,
 * 2) Decidir qué versión usar,
 * 3) Descargar pywikibot,
 * 4) Configurar las preferencias básicas de pywikibot.

Descargar Python

 * Sistemas Unix: comúnmente tienen instalada una versión suficientemente reciente de Python (2.5 para compat, 2.7 para core). Verifícalo con


 * Mac OS X 10.8+: tiene una versión de Python que es suficientemente reciente para ejecutar pywikibot. Si utilizas una versión antigua de OS X, o no estás seguro, descarga e instala Python 2.7.6 desde aquí: http://www.python.org/downloads/


 * Windows: descarga e instala la última versión de Python 2.7 desde aquí: http://www.python.org/downloads/


 * Versiónes de Python: Las siguientes versiones de Python son soportadas:

Debido a un bug de Unicode en la biblioteca subyacente de Python, Python 2.7.0 y 2.7.1 no son soportados usando Core branch. También ve los Requerimientos para un bot, que describe las versiónes de Python y Ramas Pywikibot necesarias.

Descargar Pywikibot
The easiest way to download Pywikibot is to use the latest nightly release. Just download the pywikibot zip file to your computer and decompress the file – there is no further installation required.

Descargar Pywikibot con Git
For installing with Git you need to run: With the  option it automatically installs the required submodules. Currently there is one submodules (i18n), which is really required even for English language bots.

Shortcut in command line
To allow your source code to be developed outside of the pywikibot source directory, add something like: to a file that gets run on login, usually ~/.bashrc - this avoids typing the export PYTHONPATH part in each time you log in. Naturally, change paths to match your installation.

Similarly, you can set the PYWIKIBOT2_DIR environment variable to specify the directory in which user-specific information is stored (in particular, user-config.py which contains login data for the bot).

Updating
The pywikibot framework is a perpetual beta software. Bugfixes, new options, new behavior and changes of the mediawiki software leads to frequently new releases and needs the working copy code to be up to date. Please update your branch regularly (daily period or at least once a week).

Updating nightly dump

 * If you are using a nightly version, the process is a bit more complicated. You have to re-download a full copy from here. Before installing it, backup your configuration files and scripts (user-config.py, any family file, or custom script that you might have created, and any current dump XML file you're using for a wiki). Replace your pywikibot directory by the new version you just downloaded. Restore your configuration files. If you're not sure of what you're doing, do not erase but keep a backup of your complete old pywikibot directory, to avoid losing any important files.

Updating git

 * If you used Git for downloading Pywikibot, you must go to the your directory and run the following command:


 * You may need to do  as well, if you need up-to-date i18n files.

Dependencias
Use  package management system to install dependencies. It is included by Python 2.7.9 and Python 3.4. To install all dependencies just run the following command (keeping in mind that some dependencies will require MySQL Connector C++ Libraries):

For a single package use:

To uninstall a single package use:

Crear archivos de usuarios
As a final step before using the bot scripts, you have to create user configuration files. The main one is. If you execute your favorite script after installation (for example, ) then pywikibot ask questions on how you want to configure your local copy and will create these files. You can also run generate user files.py to create these files.

Ejecutar Pywikibot en Windows
Véanse las instrucciones en Manual:Pywikibot/Windows.

Verifying your installation
With the core branch, entering in the command line python pwb.py login should prompt for the login password for your bot, and then report Logged in on somewiki:lang as bot username.