4
votes

The default backend for my matplotlib is 'agg'. I read on stackoverflow (How can I set the 'backend' in matplotlib in Python?) that in order to display graphics I need to use TkAgg, WX, QTAgg, or QT4Agg. I tried using all 4 (mpl.use('TkAgg') etc) and matplotlib cannot find any of them (I cannot use QTAgg or QT4Agg because it is not compatible with python3 according to matplotlib). I'm not sure what is wrong since when I go to /usr/local/lib/python3.3/dist-packages/matplotlib/backends/, tkagg.py and backend_tkagg.py are both there. These errors all apply to wx also.

I use python3.3 on Quantal if that has any relevance.

1
what about _tkagg.so? - wRAR
That's why it cannot import it. - wRAR
how did you install mpl, and what OS are you using? - tacaswell
Where can I get _tkagg.so? - William Bing Hua
I installed mpl from source and I'm using Ubuntu Quantal - William Bing Hua

1 Answers

5
votes

I was getting the same error on Fedora 18. I installed the matplotib package for Python 3 from the repository.

Installing the package python3-matplotlib-tk got rid of this error for me on Fedora.

On Ubuntu, install the tk-dev package, and install matplotlib again: python3 setup.py build and python3 setup.py install.

However, I soon ran into this one on Fedora: Python 3 and matplotlib lissue on Linux