1

I'm experiencing the following:

$ python
Python 2.7.4 (v2.7.4:026ee0057e2d, Apr  6 2013, 11:43:10) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ','.join(['1','2','3']
... 
... 
... )
Segmentation fault: 11

$ python
Python 2.7.4 (v2.7.4:026ee0057e2d, Apr  6 2013, 11:43:10) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ','.join(['1','2','3'])
'1,2,3'
>>> ','.join(['1','2','3']
Segmentation fault: 11

$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python

This looks like an interpreter bug to me, am I right?


(My instinct says I should be getting a

SyntaxError: unexpected EOF while parsing

)

blueberryfields
  • 45,910
  • 28
  • 89
  • 168

1 Answers1

1

FWIW; this is my setup of Mavericks. As you see all my binaries are in /System/Library/... and not /Library/.... Try to run one of these directly if you have them.

There are several ways to choose your current Python version (python-config, see also man python), maybe you have interfered with those?

pu@pumbair: ~  which python
/usr/bin/python
pu@pumbair: ~  v /usr/bin/pytho*
-rwxr-xr-x  2 root  wheel    57K 27 Oct 20:28 /usr/bin/python
-rwxr-xr-x  5 root  wheel   925B 27 Oct 20:28 /usr/bin/python-config
lrwxr-xr-x  1 root  wheel    75B 27 Oct 20:28 /usr/bin/python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
lrwxr-xr-x  1 root  wheel    82B 27 Oct 20:28 /usr/bin/python2.5-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5-config
lrwxr-xr-x  1 root  wheel    75B 27 Oct 20:28 /usr/bin/python2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
lrwxr-xr-x  1 root  wheel    82B 27 Oct 20:28 /usr/bin/python2.6-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config
lrwxr-xr-x  1 root  wheel    75B 27 Oct 20:28 /usr/bin/python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x  1 root  wheel    82B 27 Oct 20:28 /usr/bin/python2.7-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
-rwxr-xr-x  2 root  wheel    57K 27 Oct 20:28 /usr/bin/pythonw
lrwxr-xr-x  1 root  wheel    76B 27 Oct 20:28 /usr/bin/pythonw2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw2.5
lrwxr-xr-x  1 root  wheel    76B 27 Oct 20:28 /usr/bin/pythonw2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6
lrwxr-xr-x  1 root  wheel    76B 27 Oct 20:28 /usr/bin/pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
uselpa
  • 18,732
  • 2
  • 34
  • 52
  • ooooh... this is probably an upgrade snafu. i also have the versions you list, and they're properly compiled. i haven't messed around with my python versions, but i think i have an explicit path directive somewhere, and it's pointing to an old location for python (i wonder how old...) – blueberryfields Nov 21 '13 at 22:37