I am getting an issue in Python 3.3.2 on OSX 10.9 where if I open Python in a terminal window, it exits with "Segmentation error: 11" after the second line I enter, regardless of what the two commands are. For example, if I enter:
>>> for x in range(1000): print(x)
that works fine, but if I enter:
>>> for x in range(1000):
... print(x)
then I get the error when I press enter on the second line. I can also run a script with more than 2 lines without any problems.
I updated to OSX 10.9 this afternoon, so I suspect that may be it.
However, I just recently installed IPython (along with several other packages) and have been using that the past couple of days, so it could be something else I installed recently. I had a couple unsuccessful attempts at installing PyQt where I ran configure.py but then the "make" command failed, which I was also suspicious of.
I tried reinstalling Python, but it didn't resolve the issue. Both IPython and IDLE work with no problems. I'm just concerned about what could be the underlying issue.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…