Strange Problems With Python After Upgrading to OS X Mavericks

冷暖自知 提交于 2020-01-12 10:12:05

问题


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


回答1:


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.




回答2:


The (brand new) Python 3.3.3rc1 fixes the SegFault problem.

It's here: http://www.python.org/download/releases/3.3.3/



来源:https://stackoverflow.com/questions/19723073/strange-problems-with-python-after-upgrading-to-os-x-mavericks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!