Thanks MinRK,<div><br></div><div>I did try to use easy_install, but used it after pip. I think since I had already installed it, easy_install was not installing it again.</div><div><br></div><div>I did not easy_install -a readline and this solved my problem.</div>
<div><br></div><div>Thanks for the email!<br><br><div class="gmail_quote">On Sat, Sep 10, 2011 at 11:32 PM, MinRK <span dir="ltr"><<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Short answer: use easy_install, not pip, to get readline.</div><div><br></div><div>Long answer:</div><div><br></div>tab completion will "work" with libedit, but it will not be well behaved. Among the 'not well behaved' aspects of using libedit includes random crashes of the interpreter. This is why the warning is so loud.<div>
<br></div><div>The thing to check is the output of:</div><div><br></div><div>python -c "import readline; print readline"<br><br></div><div>and in IPython:</div><div><br></div><div>import readline</div><div>print readline._rl</div>
<div><br></div><div>I expect you will see something like:</div><div>`<module 'readline' from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so'>`</div><div><br>
</div><div>which would mean that you are not using your newly installed readline.</div><div><br></div><div>You mentioned on SO that you added the egg-info to sys.path, but when I just now installed readline with pip, it put readline.so directly in site-packages, not in egg-info, so your path insertion won't help (if you insert the site-packages dir itself, it might). This behavior is different between pip and easy_install, which puts the file inside the egg, and then adds it to the path.</div>
<div><br></div><div>The OSX path is *weird*. The extra library paths (lib-dynload, plat-mac, Extras, etc.) show up after individual packages, but *before* site-packages dirs, because site.addsitedir *appends* to sys.path, rather than inserts, whereas regular package dirs are *inserted*. That means that a module that is in the system lib-dynload has import priority over one in site-packages, and even the *user* site-packages.</div>
<div><br></div><div>-MinRK</div><div><br></div><div><div class="gmail_quote"><div><div></div><div class="h5">On Sat, Sep 10, 2011 at 18:34, Lisa Daniels <span dir="ltr"><<a href="mailto:lisa.kelly.daniels@gmail.com" target="_blank">lisa.kelly.daniels@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">Hi Folks,<div>I got a warning message related to readling when I was trying to run ipython using osx. I created a question here <a href="http://stackoverflow.com/questions/7375545/ipython-complaining-about-readline" target="_blank">http://stackoverflow.com/questions/7375545/ipython-complaining-about-readline</a>, but I thought this would be a more appropriate forum after I spent some more time on this issue.</div>
<div><br></div><div>I suspect that this is a fake warning, since I am able to get tab completion to work. I think (but I am not sure) that the issue is related to this : <a href="https://github.com/ipython/ipython/pull/525" target="_blank">https://github.com/ipython/ipython/pull/525</a></div>
<div><br></div><div>I put some print statements like so:</div><div><div><font face="'courier new', monospace"> if p is not None and p.returncode == 0 and re.search(r'/libedit[\.\d+]*.dylib\s', out.decode()):</font></div>
<div><font face="'courier new', monospace"> #if p is not None and p.returncode == 0 and re.search(r'/libedit[\.\d+]*\.dylib\s', out):</font></div><div><font face="'courier new', monospace"> # we are bound to libedit - new in Leopard</font></div>
<div><font face="'courier new', monospace"> print repr(p)</font></div><div><font face="'courier new', monospace"> print p.returncode</font></div><div><font face="'courier new', monospace"> print have_readline</font></div>
<div><font face="'courier new', monospace"> print repr(out)</font></div></div><div><br></div><div>and I got the following:</div><div><br></div><div><div><font face="'courier new', monospace">$ ipython</font></div>
<div><font face="'courier new', monospace"><subprocess.Popen object at 0x10171e550></font></div><div><font face="'courier new', monospace">0</font></div><div><font face="'courier new', monospace">True</font></div>
<div><font face="'courier new', monospace">'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so:\n\t/usr/lib/libedit.2.dylib (compatibility version 2.0.0, current version 2.11.0)\n\t/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)\n'</font></div>
<div><br></div></div><div>From this point on, I am a little lost and would appreciate any advice of what I need to do to get rid of this warning.</div><div><br></div><div><br></div><div><br></div>
<br></div></div>_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org" target="_blank">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>