osx上Python2.7.4的连接上的Segfault-正确的行为还是错误?

osx上Python2.7.4的连接上的Segfault-正确的行为还是错误?,python,macos,Python,Macos,我经历了以下几点: $ 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'] ... ... .

我经历了以下几点:

$ 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
这看起来像是一个翻译错误,对吗


(我的直觉告诉我应该得到一份工作

SyntaxError: unexpected EOF while parsing

)FWIW;这是我的小牛队。正如您看到的,我所有的二进制文件都在
/System/Library/…
中,而不是
/Library/…
。如果有的话,试着直接运行其中一个

有几种方法可以选择您当前的Python版本(
Python config
,另请参见
manpython
),可能您干扰了这些方法

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

FWIW;这是我的小牛队。正如您看到的,我所有的二进制文件都在
/System/Library/…
中,而不是
/Library/…
。如果有的话,试着直接运行其中一个

有几种方法可以选择您当前的Python版本(
Python config
,另请参见
manpython
),可能您干扰了这些方法

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

看起来像(另一个)osx bug。可能与OSX的哪个版本有关?这是OS X附带的Python版本吗?@uselpa mavericks。我升级了-从来没有弄乱过python版本,所以它是osx想要我拥有的东西,看起来像(另一个)osx bug。可能与OSX的哪个版本有关?这是OS X附带的Python版本吗?@uselpa mavericks。我升级了-从来没有乱搞过python版本,所以它是osx想要我拥有的东西哦。。。这可能是一个升级陷阱。我也有你列出的版本,它们被正确编译。我没有弄乱我的python版本,但我想我有一个明确的路径指令,它指向python的一个旧位置(我想知道它有多旧…)。。。这可能是一个升级陷阱。我也有你列出的版本,它们被正确编译。我还没有搞乱我的python版本,但我想我在某处有一个显式的path指令,它指向python的一个旧位置(我不知道有多旧…)