[Bioperl-l] INSTALL.WIN Documentation

Barry Moore barry.moore at genetics.utah.edu
Fri Apr 30 20:33:06 EDT 2004

JDCGo at aol.com wrote:

>Tried to install Bioperl 1.4 using PPM on Windows XT with ActivePerl, and got message "Package 'GD' not found on server."  Searched for GD but did not find a package called simply GD.
This question has come up a number of times lately.  It is not addressed 
in the documentation, and easily could be.  The problem is that neither 
ActiveState nor bioperl repositories have a GD package for installing 
with ActiveState's PPM.  This can be solved by directing Windows users 
to add http://theoryx5.uwinnipeg.ca/ppms to their ppm repository list 
(rep add Kobes http://theoryx5.uwinnipeg.ca/ppms).  I've edited the 
INSTALL.WIN file in two ways, and posted it here if anyone wants to add 
this version to the bioperl site.  First I removed the warning in 
section 1.1 against using ActiveState's Perl 5.8.0 build since I've been 
using it with bioperl for 6 months now with no problems, there are now 
more ppm packages availble for 5.8 than 5.6, and ActiveState states on 
their web site that new packages for 5.8 are their priority since it's 
the current release.  Second I added a suggestion and instructions to 
section 1.2 to add Randy Kobes ppm repository which has GD (and other 
ppms) that ActiveState doesn't have.


BioPerl on Windows

1.0 Installation
1.1 PERL on Windows
1.2 External Modules
1.3 Installing Bioperl
1.3.1 Older ActiveState PPMs
1.3.2 ActiveState PPM3
1.3.3 Download Archive
1.3.4 If All Else Fails...
2.0 Windows Specific Behaviour
2.1 Subroutine <name> redefined at location <location> warnings
2.2 Consed
3.0 BioPerl in Cygwin
3.1 Cygwin tips

This introduction was written by Paul Boutros and other Bioperl
authors. Please report problems and/or fixes to the bioperl
mailing list, bioperl-l at bioperl.org

1.0 Installation

Windows installation of BioPerl requires three steps:
i)   installation of PERL
ii)  installation of external modules
iii) installation of BioPerl itself

I'll quickly summarize my findings on each of those below.

1.1 PERL on Windows

There are a lot of ways of installing PERL on a Windows machine.
The most common is to get the most recent build from ActiveState
You can also build PERL yourself (which requires a C compiler) or
download one of the other binary distributions. Or, you can use
Cygwin and its Perl and run Bioperl in this environment. All these
approaches have worked.

The PERL source for building it yourself is available from CPAN
(http://www.cpan.org), as are a few binary distributions.

ActiveState is a software company (http://www.activestate.com) that
provides free builds of PERL for Windows users.  They are currently
(April 2004) providing a build of PERL 5.6.1 and PERL 5.8.0.

See section 3.0 for information on Cygwin and Bioperl.

1.2 External Modules

The installation documents supply a very comprehensive list of external
dependencies (i.e. see http://www.bioperl.org/Core/external.shtml).  You
do not need to install external modules for the parts of BioPerl that you
do not intend use.

If you are using ActiveState, I recommend first attempting to download
your external modules via the ActiveState Perl Package Manager (PPM).
Some external modules are not available via ppm from ActiveState (such
as GD).  Adding Randy Kobes ppm repository at the University of Winnipeg
should take care of alot of these.  Open a Windows command prompt and type
ppm to start that program.  From the ppm prompt run the following command:

ppm> rep add Kobes http://theoryx5.uwinnipeg.ca/ppms/

Now to install IO::String for instance from the ppm prompt run the command:

ppm> Install IO::String

If you want to have more control over what is installed, search IO::String
first, and then install the version that you want from what is available.

As of this writing (April 2004) there are some external modules are not yet
available via ppm.  If you still haven't found the packages that you need
you will have to download them directly from cpan (http://www.cpan.org) and
follow the specific build procedures for each module.

1.3 Installing BioPerl

You have two main choices for installing BioPerl.  If you are using
ActiveState you can use ppm to install with the commands:

1.3.1 Older ActiveState PPMs

PPM> set repository bioperl http://bioperl.org/DIST/
PPM> search bioperl             (shows available bioperl versions)
PPM> install bioperl		(will install the default version)

1.3.2 ActiveState PPM3

ppm> repository add bioperl http://bioperl.org/DIST
ppm> search bioperl		(shows available bioperl versions)

This last command returns a numbered list of the available bioperl
Select the number of the version you wish to install and type:

ppm> install <number>

1.3.3 Download Archive

You can download BioPerl as a compressed archive from:
This archive can be uncompressed with WinZip (or most other Zip

Don't worry if you get a warning saying something like "Archive contains
only one file!  Extract and decompress?".  This is just a variation in how
UNIX and Windows software likes to compress files.  Choose yes, and all
will be well.

You will need use nmake, not make, to utilize this approach

1.3.4. If All Else Fails....

The BioPerl directory tree should be extracted intact (i.e. ensure "Use
Folder Names" is selected in WinZip) and must be placed so that it is in
your @INC path.  It may be easier to extract the directory tree to another
location and moving the \Bio directory to \perl\site\lib

This approach will not install compiled versions of any modules in the
package, and isn't recommended.

1.4 Testing Installation

It is possible to test your BioPerl installation on windows with "make
test", although this requires having a copy of make utility available on
your system.  If you used ppm to install, this step will not be possible
as activestate doesn't install this information.

2.0 Windows-Specific Behaviour

Items of windows-specific behaviour are listed below.

2.1 Subroutine <name> redefined at <location> Warnings

BioPerl does not get along particularly nicely with the PERL -w flag on
windows systems.  The sample script below shows what happens with many

use Bio::ClusterIO;
my $stream = Bio::ClusterIO->new(
		'-file'		=> $ARGV[0],
		'-format'	=> 'UniGene',

c:\> perl -w test.pl Hs.Data
Subroutine new redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm line
Subroutine unigene_id redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm
line 284.
Subroutine title redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm line
Subroutine gene redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm line
Subroutine cytoband redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm
line 345.
Subroutine mgi redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm line
Subroutine locuslink redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm
line 390.
Subroutine gnm_terminus redefined at
C:/Perl/site/lib/Bio\Cluster\UniGene.pm line 420.
Subroutine scount redefined at C:/Perl/site/lib/Bio\Cluster\UniGene.pm
line 436.
<and many more like this>

These warnings messages are basically the result of the windows version of
PERL being more cautious than other versions.  These are only warnings
messages, and can safely be ignored.  For production code, you can remove
the -w flag and you will not receive these warnings.

2.2 Consed

The consed module cannot be run under Windows.

3.0 BioPerl in Cygwin

Cygwin is a Unix emulator and shell environment available free at
www.cygwin.com. BioPerl v. 1.* runs well within Cygwin.
Some users claim that installation of Bioperl is easier within
Cygwin than within Windows, but these may be users with Unix

One advantage of using Bioperl in Cygwin is that all the external
modules are available through CPAN - the same cannot be said of
ActiveState's Perl.

To get Bioperl running first install the basic Cygwin package as well
as the Cygwin Perl, make, and gcc packages. Clicking the "View" button
in the upper right of the installer enables you to see details on the
various packages. Then follow the BioPerl installation instructions
for Unix in BioPerl's INSTALL file.

Note that expat comes with Cygwin (it's used by the module XML::Parser).

One known issue is that DBD::mysql can be tricky to install in
Cygwin and this module is required for the bioperl-db, Biosql, and
bioperl-pipeline external packages. Fortunately there's some good
instructions online:

Also, set the environmental variable TMPDIR, programs like BLAST and
clustalw need a place to create temporary files. E.g.:

setenv TMPDIR e:/cygwin/tmp     # csh, tcsh
export TMPDIR=e:/cygwin/tmp     # sh, bash

Note that this is not a syntax that Cygwin understands, which would be
something like "/cygdrive/e/cygwin/tmp". This is the syntax that a
Perl module expects on Windows.

If this variable is not set correctly you'll see errors like this
when you run Bio::Tools::Run::StandAloneBlast:

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Could not open /tmp/gXkwEbrL0a: No such file or directory
STACK: Error::throw

3.1 Cygwin tips

The easiest way to install Mysql is to use the Windows binaries
available at www.mysql.com. Note that Windows does not have
sockets, so you need to force the Mysql connections to use TCP/IP
instead. Do this by using the "-h" option from the command-line:

>mysql -h -u blip -pblop biosql

Or, alias the mysql command in your .tcshrc, .cshrc, or .bashrc
so it uses a host. For example, if your databases are installed

alias mysql 'mysql -h'

If you're trying to use some application or resource "outside" of
Cygwin and you're having a problem remember that Cygwin's path syntax
may not be the correct one. Cygwin understands '/home/jacky' or
'/cygdrive/e/cygwin/home/jacky' (when referring to the E: drive)
but the external resource may want 'E:/cygwin/home/jacky'. So your
*rc files may end up with paths written in these different syntaxes,

If you can, install Cygwin on a drive or partition that's
NTFS-formatted, not FAT32-formatted. When you install Cygwin on a FAT32
partition you will not be able to set permissions and ownership
correctly. In most situations this probably won't make any difference
but there may be occasions where this is a problem.

If you want use BLAST we recommend that the Windows binary be obtained
from NCBI (ftp://ftp.ncbi.nih.gov/blast/executables/LATEST-BLAST - the
file will be named something like blast-2.2.6-ia32-win32.exe).
Then follow the Windows instructions in README.bls.

Although we've recommended using the BLAST and Mysql binaries you
should be able to compile just about everything else from source
code using Cygwin's gcc. You'll notice when you're installing Cygwin
that many different libraries are also available (gd, jpeg, etc.).


More information about the Bioperl-l mailing list