Unable to import FigureCanvasWxAgg from Matplotlib in Python
Question: I'm using Python x64 with everything installed, but I'm getting an unresolved
import on FigureCanvasWxAgg. I can get up to matplotlib.backends.backend_wxagg
but there's no FigureCanvasWxAgg to import from there.

I've also tried `from matplotlib.backends.backend_wxagg import *` but it
doesn't work either.

EDIT: Problem solved. I took a peek at my backend_wxagg.py file and found it
to be completely different than the one listed
[here](http://www.java2s.com/Open-Source/Python/Chart-
Report/Matplotlib/matplotlib-0.99.1.1/lib/matplotlib/backends/backend_wxagg.py.htm).
So I copied that from version 0.99.1.1 into my 1.0.1 file. (I should probably
just uninstall 1.0.1 matplotlib and use the older version.) Anyway, it got the
examples working, so I'm happy.


Answer: What OS are you on, and how did you install matplotlib?

Your solution is quite likely to break things... You need to build and install
the wx backend as you normally would. I'm not sure about the wx backend, but
several of the other backends are C extensions, not just a simple python file.

The wx backend isn't built by default, so it's usually included as a separate
package. (e.g. `python-matplotlib-wx` in the case of Suse) You'll need to
install the wx backend through your package manager, as you normally would.

If you're on an OS without a package manager (e.g. windows, osx), the
installer may or may not have the wx backend built depending on who built it
and how it was configured. I know absolutely nothing about non-linux or BSD
oses, so you're on your own there. Try looking wherever you downloaded your
matplotlib binary from and see if they have a separate installer for the wx
backend.

If you're building from source, you need to enable the wx backend and rebuild.
To do this, edit the `site.cfg` file in your build directory. You may need to
rename the default one (`site.cfg.default`, or something along those lines) to
`site.cfg`, if you don't alread have a `site.cfg` file in your build
directory.

Hope that helps!

