Manual:Pywikibot/Installation/ja

For installing or updating compat see, to update or install via SVN see.

初期設定
pywikibot をインストールする基本的な手順は以下の通りです:
 * 1) Python をダウンロードまたは更新する
 * 2) pywikibot をダウンロードする
 * 3) pywikibot の基本的な設定をする

Python のダウンロード

 * Unix systems: typically have a recent-enough version of Python installed. Check with.


 * Mac OS X 10.8 以降: pywikibot が動作する程度に新しいバージョンの Python がインストールされています. 古い OS X を使用している場合、または分からない場合は、こちらから Python 2.7.10 をダウンロードおよびインストールしてください: http://www.python.org/downloads/


 * Windows: 最新リリース Python 2.7.10 をこちらからダウンロードおよびインストールしてください: http://www.python.org/downloads/


 * Python version: The following versions of Python are supported:

Due to a Unicode bug in the underlying python library, Python 2.7.0 and 2.7.1 are not supported using the Core branch. See also the requirements for a bot, which describes needed python version and pywikibot branches.

Pywikibot のダウンロード
nightly releaseの最新版を使うと便利です. ダウンロード後に自動解凍してくれるため、インストールする必要がありません.

Git での Pywikibot のダウンロード
Git を使用してインストールする場合は以下を実行する必要があります: オプションは自動的に必要なサブモジュールをインストールします. 現状、モジュールは一つ (i18n) で、英語版のボットであっても欠かすことはできません.

コマンドラインのショートカット
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).

更新
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.

If you have changed some scripts of the framework, you have to merge the differences by yourself. Version control systems like git or svn does it automatically.

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.

依存関係
Use  package management system to install dependencies. Python 2.7.9 と Python 3.4 に組み込み. すべての蚕目をインストールするには以下のコマンドを実行 (依存性により MySQL Connector C++ Libraries を要する場合に注意):

For a single package use:

To uninstall a single package use:

利用者ファイルの作成
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.

WindowsでのPywikibotの実行
Please notice the instruction at 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.