[BioPython] AttributeError: 'module' object has no attribute 'parse'

richa richa at musc.edu
Tue Jun 12 17:13:17 UTC 2007


It responded with the same error message using apt-get for me too.  I 
used synaptic.  I just uninstalled and reinstalled again and looking at 
the log I saw the same error message.  However it did not quit 
installation and  some of biopython's modules retain functionality.  It 
appears then that this is an installation issue.

Any suggestions for what is missing for a clean install?

I. Friedberg wrote:
> I just tried to install biopython in Ubuntu Feisty and the 
> installation breaks:
>
> % sudo apt-get install python-biopython
>
> [... lots of apt install log messages...]
>
> Setting up python-biopython (1.42-2) ...
> Compiling /var/lib/python-support/python2.5/Bio/Wise/dnal.py ...
>   File "/var/lib/python-support/python2.5/Bio/Wise/dnal.py", line 5
>     from __future__ import division
> SyntaxError: from __future__ imports must occur at the beginning of 
> the file
>
>
> How come you managed to install?
>
>
>
>
>
>
> On 6/12/07, *richa* <richa at musc.edu <mailto:richa at musc.edu>> wrote:
>
>     Hi all,
>
>     Just installed biopython on ubuntu feisty.  Dependencies and package
>     seemed to install without a problem.  Many of the test files that
>     come
>     with it work fine, but the SeqIO object runs into a problem.   For
>     example, the following code causes an error saying that the 'module'
>     object has no attribute 'parse'.
>
>     Is this a problem of syntax or is it an installation issue?
>
>     from Bio import SeqIO
>     handle = open("ls_orchid.fasta", "rU")
>     for record in SeqIO.parse(handle, "fasta") :
>        print record.id <http://record.id>
>
>     _______________________________________________
>     BioPython mailing list  -  BioPython at lists.open-bio.org
>     <mailto:BioPython at lists.open-bio.org>
>     http://lists.open-bio.org/mailman/listinfo/biopython
>     <http://lists.open-bio.org/mailman/listinfo/biopython>
>
>
>
>
> -- 
>
> I. Friedberg
>
> "The only problem with troubleshooting is that
> sometimes trouble shoots back." 




More information about the Biopython mailing list