Getting matplotlib to work on macOS Edit or create file: nano ~/.matplotlib/matplotlibrc Set content as: backend: TkAgg