5

It crashes everytime I try to import from math. Is there a way to reinstall the math library? I'm on Python 3.3.2.

sidwyn$ python3
>>> from math import pi
Segmentation fault: 11
Sidwyn Koh
  • 1,742
  • 2
  • 21
  • 29

2 Answers2

3

Please try this:

$ env -i python3.3
>>> import faulthandler
>>> faulthandler.enable()
>>> import math
>>> math
<module 'math' (built-in)>
>>> from math import pi
# should segfault

and try to run python inside the GNU debugger. You have to type "run" into the gdb shell to start Python and "backtrace" to get the C call stack.

$ gdb python3.3
(gdb) run
>>> from math import pi
# should segfault
(gdb) backtrace

and post the output here.

Christian Heimes
  • 1,365
  • 10
  • 10
1

Turns out it is a Mavericks issue. Should have searched more thoroughly before asking. Sorry.

Duplicate Question: Python crashing when running two commands (Segmentation Fault: 11)

Community
  • 1
  • 1
Sidwyn Koh
  • 1,742
  • 2
  • 21
  • 29