python – Segmentation fault: 11 in OS X

python – Segmentation fault: 11 in OS X

This is a bug in the readline compatibility in python, related to changes introduced in OSX10.9. This weekend, release candidates for Python2.7.6 and Python3.3.3 were released which fix this bug. The download links are below.

Heres the issue, quoting from Ned Deily, writing on the python-dev email list.

On Tuesday, Apple released OS X 10.9 (a.k.a. Mavericks). There has already
been a lot of interest in it, in part because Apple has made it available for
free and has made it easy for users with 10.8, 10.7, and (most) 10.6 systems
to upgrade directly to 10.9. Unfortunately, there are issues with our current
maintenance releases (3.3.2 and 2.7.5) on OS X 10.9 that call for new
maintenance releases as soon as possible.

One is critical in that it causes the interpreter to crash when running in
interactive mode ( The problem was due to
a long-standing compatibility issue in libedits readline compatibility layer
that upstream has finally fixed and Apple has now shipped in 10.9. Because
the installers dynamically link to libedit, the original workaround
in readline.c for the original design flaw in history indexing now causes a
segfault on 10.9 when the user types in the second command interactively. Not
good. Ronald devised a fix that allows at runtime to detect and
work with either version of libedit so that we continue to have binary
compatibility across multiple OS X releases. That fix is already out in the
3.4.0 alphas and backported to the 3.3 and 2.7 branches, awaiting release
there. Just in the last 12 hours, there have been at least four duplicates of
the issue reported by users. Ive updated the original issue to explicitly
mention 10.9, now that it is no longer under NDA, and to provide a
downloadable script for inexperienced users to workaround the problem by
removing Presumably, as word gets out, there will be fewer
duplicate issues opened but the impact will remain.

I had this problem after upgrading to OS X 10.9 and used the patch provided on the Python website:

To use it, open a terminal session in (or other shell), then enter:

curl -O
openssl sha1
# the digest should be 7cb0ff57820a027dd4ca242eb2418930f8f46b4c

sh ./

Enter your password, if prompted

python – Segmentation fault: 11 in OS X

I had this problem. Changing the chunksize in my csv parser to 100 eliminated the error.

Leave a Reply

Your email address will not be published. Required fields are marked *