5

I'm using Ubuntu 20.04 LTS. I've recently installed Matplotlib for Python 3.9 and when I try to plot a graph it gives me the error:

Matplotlib is currently using agg, which is non-GUI backend, so cannot show the figure.

Do I have to install something else for it to work?

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
Unnamed
  • 183
  • 1
  • 3
  • 11

1 Answers1

7

Yes, you have to. The accepted answer to this similar Stack Overflow question suggests that the problem is that tkinter is not installed. You can install it using:

sudo apt install python3-tk
BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77