牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

ipython入れてみた

以前、使ってたiBookインスコしたことあったけど、なぜか動かなかったのでまたやってみた
今度はMacBookで。

macportsで失敗

sudo port install py25-ipython
sudo port install py25-readline

ipythonとコマンドいれても

-bash: ipython: command not found

となる(´・ω・`)

ez_installでやってみたが....

sudo port install py25-setuptools
sudo easy_install readline
sudo easy_install ipython

(※readline は必要かどうか分からんけど(´・ω・`))

今度は動いたけど...(´・ω・`)

MacBook-2:~ username$ ipython
Leopard libedit detected.
**********************************************************************
Welcome to IPython. I will try to create a personal configuration directory
where you can customize many aspects of IPython's functionality in:

/Users/username/.ipython
Initializing from configuration /Library/Python/2.5/site-packages/ipython-0.9.1-py2.5.egg/IPython/UserConfig

Successful installation!

Please read the sections 'Initial Configuration' and 'Quick Tips' in the
IPython manual (there are both HTML and PDF versions supplied with the
distribution) to make sure that your system environment is properly configured
to take advantage of IPython's features.

Important note: the configuration system has changed! The old system is
still in place, but its setting may be partly overridden by the settings in 
"~/.ipython/ipy_user_conf.py" config file. Please take a look at the file 
if some of the new settings bother you. 


Please press <RETURN> to start IPython.
**********************************************************************
Python 2.5.1 (r251:54863, Jul 23 2008, 11:00:16) 
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: 


Python 2.5.1 ってMacOSXデフォのやつかー(´・ω・`)
(※当たり前ですよねぇ)

と思ったら簡単に解決した(´・ω・`)

やっぱりMacportsのがいいかなーと思ってアンインスコしてまたインスコしたりして。
/opt/local/bin/ の中をなんとなく覗いてみた。
ipython2.5
ipython2.5
ipython2.5
ターミナルから「ipython2.5」を入力。
そしたら動いたぁー。敵は「2.5」だったのね(||゚Д゚)
「ipython」で動くように .bash_profile にエイリアス書いとこ

alias ipython='/opt/local/bin/ipython2.5'

んで
ターミナルから「ipython」で確認

MacBook-2:~ username$ ipython
Python 2.5.2 (r252:60911, Sep  2 2008, 07:35:20) 
Type "copyright", "credits" or "license" for more information.

IPython 0.8.4 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: 

オケイ(゚Д゚)b
疲れてんのかなー

クラシックモード

忘れてたので追記
.bash_profile のエイリアスとかを

alias ipython='/opt/local/bin/ipython2.5 -cl'

って最後に" -cl"を付けるとプロンプトが In[1] とか Out [1] とかでなくて

>>> 

になるですよ(゚Д゚)b(と教わった、GAEハカで)