1

Within PyCharm (Versions 2020.3) I'm unable to show any plots and I get an error. I've tried following other recommendations of going into PyCharm settings and unselecting "PyQt" as well as selecting "Gevent compatible" with no luck. I believe the issue started happening after the latest Big Sur update, but I'm not 100% positive. Below are the errors and any other info I thought might be relevant. I would love any help or guidance since this has been driving me crazy for a couple weeks moving output just to visualize things in Jupyter Notebooks! Thank you in advance!!

Error: "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)"

And here is the error message popup:

enter image description here

Some more info and not sure if this matters, but when I import matplotlib I get this output:

"Backend MacOSX is interactive backend. Turning interactive mode on."

Here is a basic example from Matplotlib site to reproduce my error as well as the basic code block:

import numpy as np
import matplotlib.pyplot as plt

# Fixing random state for reproducibility
np.random.seed(19680801)

N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = (30 * np.random.rand(N))**2  # 0 to 15 point radii

plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()
Andre
  • 360
  • 1
  • 7
  • 19
  • A very similar error message was reported yesterday under different circumstances, [here's a link to the question](https://stackoverflow.com/q/65414578) in the comments there's an assortment of similar cases. – bad_coder Dec 23 '20 at 17:33
  • @bad_coder thanks for quick response. This mentions error 137 and based on "excessive memory usage" which I don't believe my error 139 is that since it occurs even if I start fresh and do the simple matplotlib example. – Andre Dec 23 '20 at 18:41
  • 1
    I have updated the library matplotlib to 3.3.4 and the problem was solved. It's not related to PyCharm, from terminal the problem occurs as well. – fernolimits Feb 14 '21 at 13:06
  • That worked @fernolimits!! – Andre Feb 15 '21 at 19:18

2 Answers2

2

Per @fernolimits above, I upgraded matplotlib (pip install --upgrade matplotlib) from version 3.2.1 to 3.3.4 and it worked!

Andre
  • 360
  • 1
  • 7
  • 19
0

I ran the command (pip install --upgrade matplotlib but doesn't work. So I manually upgrade it in pycharm then restart pycharm and it worked

Preference in PyCharm

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Jacky
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 14 '22 at 06:00