python3.3 matplotlib cannot import name _tkagg
matplotlib, python, python-3.x
Solution
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
Problem
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.