升级到 OS X Mavericks 后 Python 的奇怪问题 [英] Strange Problems With Python After Upgrading to OS X Mavericks

查看:68
本文介绍了升级到 OS X Mavericks 后 Python 的奇怪问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将我的 OS X Lion 升级到 Mavericks 后,我遇到了一些奇怪的问题.起初,它给了我分段错误总线错误.经过一番搜索,我注意到它与 readline 库有关.bugs.python.org 描述了该解决方案:

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

这将禁用 readline 库.错误现在消失了,但我还有另一个问题.在 Python shell 中,当我按下箭头键(向上、向下、向左或向右)时,它给了我这些: ^[[A, [[C^, ^[[B, ^[[D.我认为问题仍然与readline 库有关,但我不知道如何解决.

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.

提前致谢.

问候

推荐答案

我对 Python 的本质没有权威,所以请谨慎对待我的建议.但是,在小牛队升级(并使用 Python 2.7)后遇到了同样的问题,我只是做了一个

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

在命令行中,一切似乎又恢复了.不再出现分段错误,并且 Python shell 中的箭头键似乎正常运行.

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.

这篇关于升级到 OS X Mavericks 后 Python 的奇怪问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆