Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Active Perl in Windows XP. Through Perl Package Manager I have installed BioPerl repositories. But while trying to execute this BioPerl program:

#!/usr/bin/env perl
use Bio::Seq;
use Bio::SeqIO;

# create a sequence object of some DNA
my $seq = Bio::Seq->new(-id => 'testseq', -seq => 'CATGTAGATAG');

# print out some details about it
print "seq is ", $seq->length, " bases long\n";
print "revcom seq is ", $seq->revcom->seq, "\n";

# write it to a file in Fasta format 
my $out = Bio::SeqIO->new(-file => '>testseq.fsa', -format => 'Fasta');

The following error is occurring

Cant locate Bio/ in @INC at C:\Perl\bin\ line1. BEGIN failed--compilation aborted at C:\Perl\bin\ line1.

What is the problem here? How can I identify whether BioPerl is installed or not?

share|improve this question

to find out what modules you have installed, open a terminal and type:

ppm query

This is a tool that comes with Active Perl (see the CPAN FAQ).

Also, bear in mind that the "shebang" (#!/usr/bin/env perl) you are using will not work on a windows system. Can't be sure since I have never used windows for coding but that is a thing of the UNIX world unless active perl actively (sorry) translates it to whatever windows can deal with.

So, either bioperl is not installed or your Perl is not set up correctly. Perl will search for modules and the like in the directories defined by the @INC variable. A simple way of checking if the relevant directory is in the list is running this little one liner:

perl -e "do{print \"$_\n\"}for(@INC)"

It will print all directories where Perl will search for its modules.

PS. This may be a good time to check out linux...

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .