title: Unable to plot histogram in pycharm, works fine in terminal
body: <p>I do exactly the same thing in both macOS terminal and pycharm console:</p>
  <pre><code>&gt;&gt;&gt; import matplotlib.pyplot as plt
  &gt;&gt;&gt; plt.hist([-94, -89, 88, 55, 45, 44, 43, 42, 1])
  2022-05-02 14:04:31.849 Python[2353:66317] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/_0/8cr6pwvs1jg99fgtf2_33lsm0000gn/T/org.python.python.savedState
  (array([2., 0., 0., 0., 0., 1., 0., 4., 1., 1.]), array([-94. , -75.8, -57.6, -39.4, -21.2,  -3. ,  15.2,  33.4,  51.6,
          69.8,  88. ]), &lt;BarContainer object of 10 artists&gt;)
  &gt;&gt;&gt; plt.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Uvvm3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Uvvm3.png" alt="fig" /></a></p>
  <pre><code>import matplotlib.pyplot as plt
  plt.hist([-94, -89, 88, 55, 45, 44, 43, 42, 1])
  Out[8]: 
  (array([2., 0., 0., 0., 0., 1., 0., 4., 1., 1.]),
   array([-94. , -75.8, -57.6, -39.4, -21.2,  -3. ,  15.2,  33.4,  51.6,
           69.8,  88. ]),
   &lt;BarContainer object of 10 artists&gt;)
  plt.show()
  Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.10/site-packages/numpy/core/getlimits.py&quot;, line 459, in __new__
      dtype = numeric.dtype(dtype)
  TypeError: 'NoneType' object is not callable
  During handling of the above exception, another exception occurred:
  Traceback (most recent call last):
    File &quot;/usr/local/lib/python3.10/site-packages/IPython/core/interactiveshell.py&quot;, line 3251, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File &quot;&lt;ipython-input-9-1eb00ff78cf2&gt;&quot;, line 1, in &lt;module&gt;
      plt.show()
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/pyplot.py&quot;, line 368, in show
      return _backend_mod.show(*args, **kwargs)
    File &quot;/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm_matplotlib_backend/backend_interagg.py&quot;, line 29, in __call__
      manager.show(**kwargs)
    File &quot;/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm_matplotlib_backend/backend_interagg.py&quot;, line 112, in show
      self.canvas.show()
    File &quot;/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm_matplotlib_backend/backend_interagg.py&quot;, line 68, in show
      FigureCanvasAgg.draw(self)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py&quot;, line 436, in draw
      self.figure.draw(self.renderer)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/artist.py&quot;, line 73, in draw_wrapper
      result = draw(artist, renderer, *args, **kwargs)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/artist.py&quot;, line 50, in draw_wrapper
      return draw(artist, renderer)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/figure.py&quot;, line 2810, in draw
      mimage._draw_list_compositing_images(
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/image.py&quot;, line 132, in _draw_list_compositing_images
      a.draw(renderer)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/artist.py&quot;, line 50, in draw_wrapper
      return draw(artist, renderer)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/axes/_base.py&quot;, line 3020, in draw
      self._unstale_viewLim()
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/axes/_base.py&quot;, line 776, in _unstale_viewLim
      self.autoscale_view(**{f&quot;scale{name}&quot;: scale
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/axes/_base.py&quot;, line 2932, in autoscale_view
      handle_single_axis(
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/axes/_base.py&quot;, line 2895, in handle_single_axis
      x0, x1 = locator.nonsingular(x0, x1)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/ticker.py&quot;, line 1654, in nonsingular
      return mtransforms.nonsingular(v0, v1, expander=.05)
    File &quot;/usr/local/lib/python3.10/site-packages/matplotlib/transforms.py&quot;, line 2880, in nonsingular
      if maxabsvalue &lt; (1e6 / tiny) * np.finfo(float).tiny:
    File &quot;/usr/local/lib/python3.10/site-packages/numpy/core/getlimits.py&quot;, line 462, in __new__
      dtype = numeric.dtype(type(dtype))
  TypeError: 'NoneType' object is not callable
  </code></pre>
  <p>And both use the same interpreter</p>
  <p><a href="https://i.stack.imgur.com/LBoyj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LBoyj.png" alt="interpreter1" /></a></p>
  <p>paths</p>
  <p><a href="https://i.stack.imgur.com/wtRZJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wtRZJ.png" alt="interpreter2" /></a></p>
  <p><strong>Edit</strong></p>
  <p>The error only happens when using the debugger, otherwise it works fine.</p>