やっと、やっと入った。
もうバージョンの関係とかが訳分からん。
とりあえず、導入のメモ。
環境はVMplayer内の仮想CentOS5.4
IRAF | 2.14 | http://iraf.noao.edu/ |
stsdas | 3.11 | http://www.stsci.edu/resources/software_hardware/stsdas/download |
python | 2.4.3 | http://www.python.org/download/releases/2.4.3/ |
tkinter | 2.4.3 | http://rpm.pbone.net/index.php3?stat=3&limit=2&srodzaj=1&dl=40&search=tkinter&field=1&field=2 |
readline | 5.1 | ftp://ftp.gnu.org/gnu/readline/ |
numpy | 1.1.0 | http://sourceforge.net/projects/numpy/files/ |
stsci_python | 2.7 | http://www.stsci.edu/resources/software_hardware/pyraf/stsci_python/ReleaseNotes/index.html |
Pmw | 1.3.2 | http://sourceforge.net/projects/pmw/files/ |
urwid | 0.9.9.1 | http://excess.org/urwid/ |
IPython | 0.7.3 | http://ipython.scipy.org/dist/old/0.7/ |
基本的には上から順に落としていけばok。
リンクは直結ではないのであしからず。
バージョンが少し古いのはCentOSのデフォルトのバージョンベースにしたため。
というか特に、pythonを2.5とかにするとどうやっても入ってくれない。
まぁ、この辺は詳しい人には解決できるのかもしれない。
計算機のOSもCentOSだけどPythonは2.5.2(1?)になってるからな。
#2010.03.27 Python2.5.1インストールに成功しました
#http://d.hatena.ne.jp/fd_lover24sue/20100327/1269668893
#(リンク先のリンクにとんでもらうことになります)
tkinterは
yum install tkinter
とでもすれば落とせる。
readlineはデフォルトで入っているはず。
これらのパッケージが存在するかどうかは
rpm -q tcl tk python readline numpy pmw urwid ipython
とでもすれば分かるが、ちゃんとpythonに認識されているかどうかは、ターミナルで"python"としてimportしてみることで分かる。
$python >>>import _tkinter >>>import readline
pythonに認識してなければerrorをはくので、パスを通してやる。
(はずなのだがこれがバージョンをデフォからかえると自分がやった限りどうやっても認識してくれない。この辺は誰かに聞きたい・・・。)
python関係は便利なことにsetup.pyという勝手にビルドとインストールをやってくれるものがあるのでありがたく使う。
$python setup.py install
numpyはstsci_pythonをインストールするために使われるので、先にインストールする。
他にどんなパッケージが必要なのかは、stsci_pythonのディレクトリにtest.pyというものがあるので、これを実行してやると教えてくれる。
login.clがないところで実行すると怒られるが、最後に確認すればよいので無視。
urwidとipythonは入れなくても大丈夫らしいが、気持ち悪いので入れておく。
必要そうなものを全てインストールして、login.clのある場所でtest.pyを実行してみて以下の様なコメントが帰ってきたら成功(と今のところ思っている)
$ python /tmp/testpk.py Checking installed versions All packages were successfully installed.
ターミナルでpyrafと打つと、pyraf worldがお出迎え。
NOAO/IRAFNET PC-IRAF Revision 2.14.1 Mon Sep 15 10:12:05 MST 2008 This is the RELEASED version of IRAF V2.14 supporting PC systems. Welcome to IRAF. To list the available commands, type ? or ??. To get detailed information about a command, type `help <command>'. To run a command or load a package, type its name. Type `bye' to exit a package, or `logout' to get out of the CL. Type `news' to find out what is new in the version of the system you are using. Visit http://iraf.net if you have questions or to report problems. The following commands or packages are currently defined: clpackage/: apropos images/ obsolete/ stsdas/ utilities/ clpackage/ language/ plot/ system/ dataio/ lists/ proto/ tables/ dbms/ noao/ softools/ user/ PyRAF 1.6.1 Copyright (c) 2002 AURA Python 2.4.3 Copyright (c) 2001-2006 Python Software Foundation. Python/CL command line wrapper .help describes executive commands -->
成功したときは結構感動した。