python3 segmentation fault on osx mavericks

蓝咒 提交于 2019-12-10 15:17:01

问题


I have been experience segmentation faults when using Python3 on OS X Mavericks. Any suggestions on how to resolve this?

I have tried to reinstall the package from the Python site, but this is ineffective. How would one recompile Python3 on the system?


回答1:


http://www.python.org/download/releases/3.3.3/

you can follow the instructions on the main python page for a quick and permanent fix. cheers,




回答2:


This problem exists because of this bug: http://bugs.python.org/issue18458.

Basically, Python has code in Modules/readline.c that contains a workaround for a bug in libedit, however the bug in libedit was fixed and Mavericks comes with the new version of libedit and the workaround now causes ython to segfault. The quick and dirty fix is to disable deadline processing by running the following command (from the bug document):

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



回答3:


The problem with that fix is that you loose many of Python's interactive features. Read this article for a more permanent fix: http://paulbramsen.com/archives/125



来源:https://stackoverflow.com/questions/19569143/python3-segmentation-fault-on-osx-mavericks

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