Installing ipython with readline on the mac

前端 未结 6 1453
温柔的废话
温柔的废话 2020-12-14 09:16

I am using ipython on Mac OS 10.5 with python 2.5.1 (I would actually like to use ipython for 2.6.1, but it doesn\'t seem to be available?)

I installed ipython via e

6条回答
  •  一整个雨季
    2020-12-14 10:05

    An alternative if you don't want to use ports. Caution: This is not upgrade safe.

    Install ipython and readline as normal:

    sudo easy_install -f http://ipython.scipy.org/dist/ readline ipython
    

    Find the full path to your readline egg. For python 2.6 this will probably be:

    /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/readline-2.5.1-py2.6-macosx-10.3-fat.egg
    

    Edit ipython with your favourite text editor:

    vim `which ipython`
    

    Before the final line in the file sys.exit, insert:

    sys.path.insert(0,'PATH_TO_READLINE_EGG')
    

    Save and exit (:wq).

    Check readline is working correct:

    ipython
    

提交回复
热议问题