Installing ipython with readline on the mac Installing ipython with readline on the mac python python

Installing ipython with readline on the mac


To install ipython on Snow Leopard or Lion without using MacPorts, you can simply do:

sudo easy_install readline ipython

(Note that if you use the "pip" to install readline, then ipython won't see the readline library, not sure why).

Edit:

If you had ipython installed remove it with

sudo pip uninstall ipython

or

pip uninstall ipython #for virtualenvs

Then make sure you have installed readline first and reinstall iptyhon

pip install readline ipython

For some reasons, if readline wasn't present during the installation, it will install itself without support for readline or it use the default mac readline.


this worked for me (I'm using python 2.7, for other versions you'll need to edit):

cd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynloadsudo mv readline.so readline.so.bak

install readline however you want (pip, homebrew, macports, etc)

pip install -U readline

Success! and it works with virtualenv, and virtualenvwrapper, and no need to modify ipython :)


You can install everything you need with essentially one command using MacPorts. First download and install MacPorts from http://www.macports.org/.

Then just do the following in the terminal:1) sudo port -v selfupdate
2) sudo port -v install py26-ipython

That will install python2.6, ipython for python 2.6 and readline for you. The command to start ipython will be located at /opt/local/bin/ipython2.6