Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange Problems With Python After Upgrading to OS X Mavericks

After upgrading my OS X Lion to Mavericks, I've encountered with strange problems. At first, It gave me segmentation fault or bus error. After searching for a bit I've noticed that it's related to the readline library. The solution was described by bugs.python.org:

curl -O http://bugs.python.org/file32324/patch_readline_issue_18458.sh 
openssl sha1 patch_readline_issue_18458.sh # the digest should be 7cb0ff57820a027dd4ca242eb2418930f8f46b4c 
sudo sh ./patch_readline_issue_18458.sh

This will disable the readline library. The errors are gone now but I have another problem. In Python shell when I press arrow keys (up, down, left or right) it gives me these: ^[[A, [[C^, ^[[B, ^[[D. I think the problem is still related to the readline library but I don't know how to solve it.

Thanks in advance.

Regards

like image 974
NEO Avatar asked Jan 28 '26 03:01

NEO


1 Answers

I'm no authority on the guts of Python, so take my advice with caution. But, having encountered the same problem after the Mavericks upgrade (and using Python 2.7), I just did a

easy_install readline

at the command line, and everything seems to be working again. No more segmentation error, and arrow keys in the Python shell appear to be functioning normally.

like image 140
Steve McCauley Avatar answered Jan 31 '26 11:01

Steve McCauley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!