2010/04/27

CentOS5.3にwxPythonをインストール 

yumでインストールする。

CentOSではそのままではyumでwxPythonはインストールできない。
※Fedoraではできる。

なのでCentOSにyumのリポジトリを追加してインストールを試みた。


【CentOS yum dag リポジトリの追加方法】※参考サイト

Fedora などのOSを使用していた方がCentOS へ乗り換えた場合、
Fedoraではyum でインストールできたものが yum の list で発見できずつまずくことがあります。

# yum list

Fedora ではパッケージとして認めているものが CentOS (RedHat) だとまだ公認でなかったりするためです。

そこで、 dag リポジトリ を追加することで解決します。
設定は簡単です。

# vi /etc/yum.repos.d/dag.repo で下記の内容を書き込み保存するだけです。
[dag]
name=Dag
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el$releasever/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

あとは、通常どうり

# yum list


【wxPythonのインストール】
# yum install wxPython

これだけ。

あとは
find / | grep demo.py
とかでデモを探して
python demo.py
で実行。うまくいった。

ちなみに、上記方法でのwxPythonのインストールは
CentOS5.3に始めから入っているpython2.4で行った。
python2.6で上記方法でやっても
-----
Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.4,compatible with 2.6),
and wxPython used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6).
アボートしました
-----
って出る。