[Biopython-dev] Enhancements to Phylo.draw; pyplot best practices
Peter Cock
p.j.a.cock at googlemail.com
Tue Apr 17 09:31:05 UTC 2012
On Tue, Apr 17, 2012 at 5:17 AM, Eric Talevich <eric.talevich at gmail.com> wrote:
>
> Actually, it was this commit which added new unit tests:
> https://github.com/biopython/biopython/commit/a5f995bc1d9e113d88195cc7ae6f389984d762d8
>
OK - thanks for checking.
> On my machine with Python 2.6 and Ubuntu, the test passes, so I'm not
> sure how to debug this, exactly. Do you know a way to prevent
> matplotlib from attempting to launch the Wx app, beyond turn off
> interactive mode as the test already does?
Not sure.
> One idea is to specify a matplotlib backend other than wx. For
> example, using this import approach in test_Phylo_depend.py might do
> the trick:
>
> try:
> import matplotlib
> except ImportError:
> raise MissingExternalDependencyError(
> "Install matplotlib if you want to use Bio.Phylo._utils.")
> else:
> # Don't use the Wx backend for matplotlib, b/c that depends on Wx being
> # properly set up on the build machine. Instead, use the simpler postscript
> # backend -- we're not going to display or save the plot anyway, so it
> # doesn't matter much, as long as it's not Wx. I guess.
> matplotlib.use("ps")
> from matplotlib import pyplot
>
>
> Would you be able to test this on the errant buildbot machine without
> having to commit this to the trunk?
Yes, that works (this buildbot is one of 'my' servers so I can run this
directly). Please check that fix in.
Thanks,
Peter
More information about the Biopython-dev
mailing list