views:

1872

answers:

3

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 easy_install. It works but is missing gnu readline (needed for nice searching of command line history with ctrl-R, etc.)

I found a blog post and other sources saying this could be fixed by

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

However, this leads to build errors in readline.c , particularly undeclared functions like rl_compentry_func_t and rl_catch_signals.

Has anyone seen these errors? Is there another way to get ipython installed with readline?

+3  A: 

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

hohonuuli
Great! This totally worked.
A: 

"I would actually like to use ipython for 2.6.1"

It is available. I'm using it with 2.6.1 on os x. You just need to install the official python 2.6.1 distribution, then install ipython with easy_install.

Vasil
+14  A: 

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

sudo easy_install-2.6 readline ipython

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

lorin
There's a discussion on the virtualenv group about the pip problem. (Summary: pip doesn't place its readline in front of the incompatible pre-installed version in sys.path)http://groups.google.com/group/python-virtualenv/browse_thread/thread/044400bab87d119c/0bf2816070524268?show_docid=0bf2816070524268
Carlton Gibson