0

I go to terminal on my mac and type python. The standard stuff shows up:

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Now I am using the terminal to do simple calculations. I simply type in the following below and keep getting a segmentation fault 11. It seems to be from the decimal point I keep inserting.

>>> a=1./2
>>> b=2./3
Segmentation fault: 11

Does anyone know why this is happening? I never had this happen before. How else would you force floating point numbers? Thank you

user1527227
  • 2,068
  • 5
  • 25
  • 36
  • You're on OS X 10.9 (Mavericks), aren't you? There's a well known issue with python and Mavericks. You'll need to `easy_install readline` – inspectorG4dget Dec 03 '13 at 01:59
  • Or just update to 2.7.6. – Ned Deily Dec 03 '13 at 02:02
  • Or just uninstall your third-party Python 2.7.3 and use the 2.7.5 that comes with Mavericks instead of trying to maintain two separate 2.7s. – abarnert Dec 03 '13 at 02:04
  • Yeah, but there are other reasons why you might need to continue to use a python.org Python, for example, if you are using binary installers of packages like NumPy that depend on the python.org version. – Ned Deily Dec 03 '13 at 02:05
  • And, if you are a beginner and planning to use `IDLE`, the system `IDLE` uses the broken system version of `Tk` that can crash if you type the right characters. – Ned Deily Dec 03 '13 at 02:12

1 Answers1

0

If you are seeing this on OS X 10.9 Mavericks, you are running into this issue with python.org Pythons, caused by a change in the system editline library, libedit. A solution is to download and install the latest version, Python 2.7.6, which has a fix for this problem.

Ned Deily
  • 83,389
  • 16
  • 128
  • 151