matplotlib crashing Python

后端 未结 5 1371
不思量自难忘°
不思量自难忘° 2021-01-13 16:21

I\'m new to Python and matplotlib. A simple script I wrote is crashing and I was able to reproduce the crash with the following code:

import matplotlib.pyplo         


        
5条回答
  •  心在旅途
    2021-01-13 16:53

    For macOS, just make sure that

    ~/.matplotlib/matplotlibrc contains:

    backend: MacOSX
    

    You don't need the other backends unless you specifically want them. Alternatively, perhaps you can do:

    import matplotlib
    matplotlib.use("MacOSX")
    

    though I have not tested that.

提交回复
热议问题