[Biopython] Bio.Phylo AttributeError: 'module' object has no attribute 'draw'

Mariam Reyad Rizkallah mrrizkalla at gmail.com
Fri Mar 2 15:27:51 UTC 2012


Hi Eric,

I was just upgraded to 1.59 and when I checked the version, it was
1.56!!!!! I can't believe that I didn't pay attention to that!

Thank you very much.

Mariam

On Fri, Mar 2, 2012 at 4:53 PM, Eric Talevich <eric.talevich at gmail.com>wrote:

> On Fri, Mar 2, 2012 at 8:48 AM, Mariam Reyad Rizkallah <
> mrrizkalla at gmail.com> wrote:
>
>> >
>> > Dear Biopython list,
>> >
>> > I am facing similar problem with Phylo in the context of your thread. I
>> am
>> > using Biopython 1.58 - Ubuntu 32 bit system. I have created a newick
>> using
>> > phyml command-line and want to visualize it using Bio.Phylo. I read the
>> > newick, draw_ascii and draw_graphiz perfectly but not draw(). I have
>> > networkx, and pylab installed.
>> >
>> > my_view_tree = Phylo.read("myseq.phy_phyml_tree.txt", "newick")
>> > Phylo.draw_ascii(my_view_tree)
>> > my_view_tree_xml = my_view_tree.as_phyloxml()
>> > Phylo.draw(my_view_tree_xml, do_show=True, show_confidence=True,
>> axes=None)
>> >
>> > *Error:*
>>
>> >
>> > Traceback (most recent call last):
>> >   File "itree/itree2/iTree2.py", line 563, in view_tree
>> >     Phylo.draw(my_view_tree_xml, do_show=True, show_confidence=True,
>> > axes=None)
>> > AttributeError: 'module' object has no attribute 'draw'
>> >
>> >
>> Thank you.
>>
>> Mariam
>>
>>
> Hi Mariam,
>
> Would you mind checking the version number of Biopython within the
> interpreter or script you're using? Like this:
>
> import Bio
> print Bio.__version__
>
>
> The function Phylo.draw was part of Biopython 1.58, so the simplest
> explanation is that your script is using a different, older installation of
> Biopython that's also installed on your system.
>
> Alternatively, to get the best experience with Phylo.draw I'd recommend
> updating to the current Biopython 1.59.
>
> Hope that helps,
> Eric
>



More information about the Biopython mailing list