[Biopython] Error in biopython
Peter Cock
p.j.a.cock at googlemail.com
Thu May 30 04:26:38 EDT 2013
On Thu, May 30, 2013 at 5:34 AM, amit bikram <amitbikram87 at gmail.com> wrote:
> Hi Peter,
>
> I tried what u have written but it is not coming. here is the error
>
>>>> import Bio
>>>> print Bio._file_
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute '_file_'
>>>> print Bio_version_
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> NameError: name 'Bio_version_' is not defined
>>>>
Hi Amit,
There are some subtle and important differences:
import Bio
print Bio.__file__
print Bio.__version__
Those are all double underscores, and also there
should be a dot between the Bio and __version__.
You'll find double underscores are used in Python
for some special functions (which normally you won't
need to worry about).
The good news is the simple import seemed to
work - so if you can try again that will help answer
your original question about this failing:
from Bio.Seq import Seq
Right now my guess would be a broken install, or
you've got a file in the current directory called Bio.py
which is being imported instead of Biopython.
Regards,
Peter
More information about the Biopython
mailing list