Yesterday, my program was working perfectly fine. However, today it stopped working. I think that it may have something to do with the latest Mac OS update, as I had just installed it today. My testing code is shown below
import matplotlib.pyplot as plt
import numpy as np
print("ehllow")
zeroes = np.zeros((10,10))
plt.imshow(zeroes)
plt.show()
Everything is going fine until I get to plt.show(). I had tried removing it, and the program ran smoothly, but once I added it back in I got the error
Segmentation fault: 11
and then it shows a python crash screen
I have python version 3.7.6 64 bit for Mac.
1) Segmentation Fault (also known as SIGSEGV and is usually signal 11) occur when the program tries to write/read outside the memory allocated for it or when writing memory which can only be read.In other words when the program tries to access the memory to which it doesn't have access to.
Segmentation fault 11 Python Segmentation fault 11 is usually caused by memory allocation issues, and if you're having this problem, be sure to try some of the solutions mentioned above. Related articles. PS Store browser not supported error [Quick fix] The code execution cannot proceed because DLL was not found.
Overview. A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core . Segfaults are caused by a program trying to read or write an illegal memory location.
Tip: A segmentation fault (also known as segfault) is a common condition that causes programs to crash; A segmentation fault is typically caused by a program trying to read from or write to an illegal memory location, that is, part of the memory to which the program is not supposed to have access.
Ok. Just for anyone wondering
Just uninstalling and reinstalling the packages that were giving the error worked for me
pip uninstall matplotlib
pip install matplotlib
I had the same issue - a Python program that was working fine before updating to Big Sur, and crashing with:
Segmentation fault: 11
after updating.
As previous responses have advised, just uninstalling and reinstalling the offending Python libraries fixed the problem. For me, that meant matplotlib:
pip uninstall matplotlib
pip install matplotlib
Thank you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With