1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Installing PDL on Windows

From pdl

(Difference between revisions)
Jump to: navigation, search
(16 intermediate revisions not shown)
Line 1: Line 1:
-
These instructions relate only to perl 5.8 and later. (For 64-bit builds of perl, ppm packages are provided only for perl versions 5.10 and later.) PDL is not supported for perl versions prior to 5.8.0. It's also assumed that you have the PPM utility. If you don't have PPM then your best option is to use [http://search.cpan.org/~smueller/PAR-Dist-InstallPPD-0.02/ PAR::Dist::InstallPPD] to install PDL - by, for example, using [http://www.sisyphusion.tk/ppm/scripts/PdlInstall this script].<br>
+
Although PDL is currently supported for perl versions back to 5.8.1, ppm packages are provided here only for 5.8.8 onwards. These instructions therefore relate only to perl 5.8.8 and later. (For 64-bit builds of perl, ppm packages are provided only for perl versions 5.12 and later.) It's also assumed that you have the PPM utility. If you don't have a correctly functioning version of  the PPM utility then one option is to use [http://search.cpan.org/~smueller/PAR-Dist-InstallPPD-0.02/ PAR::Dist::InstallPPD] to install the PDL ppm package - by, for example, using [http://www.sisyphusion.tk/ppm/scripts/PdlInstall this script].<br>
Alternatively, you could build PDL from source. (To build from source, see Win32\INSTALL in the PDL source distribution.)<br>
Alternatively, you could build PDL from source. (To build from source, see Win32\INSTALL in the PDL source distribution.)<br>
-
If you really must have a ppm utility, and the perl you're using doesn't ship with one, then you can install this somewhat crippled and modified [http://www.sisyphusion.tk/libraries/PPM-2.50_01.tar.gz CPAN version] (see "Installing PPM" below for more info).
+
If you prefer to use a ppm utility, and the perl you're using doesn't ship with one, then track down the latest version that the Strawberry Perl project provides.
 +
 
 +
Note that we now append '--force' to the ppm commands. This is explained in the [http://www.sisyphusion.tk/faq.html sisyphusion FAQ] (question 3).
First up install Astro::FITS::Header and Convert::UU by running:
First up install Astro::FITS::Header and Convert::UU by running:
<pre>
<pre>
-
ppm install http://www.sisyphusion.tk/ppm/Astro-FITS-Header.ppd
+
ppm install http://www.sisyphusion.tk/ppm/Astro-FITS-Header.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/Convert-UU.ppd
+
ppm install http://www.sisyphusion.tk/ppm/Convert-UU.ppd --force
</pre>
</pre>
-
Then install the PGPLOT (optional), OpenGL (prerequisite) and PDL modules by running, from the command line:
+
Then install the PGPLOT (optional), OpenGL (prerequisite), File::Map (prerequisite) and PDL modules by running, from the command line:
<pre>
<pre>
-
ppm install http://www.sisyphusion.tk/ppm/OpenGL.ppd
+
ppm install http://www.sisyphusion.tk/ppm/File-Map.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PGPLOT.ppd
+
ppm install http://www.sisyphusion.tk/ppm/OpenGL.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL.ppd
+
ppm install http://www.sisyphusion.tk/ppm/PGPLOT.ppd --force
 +
ppm install http://www.sisyphusion.tk/ppm/PDL.ppd --force
</pre>
</pre>
-
That will give you the latest stable release of PDL. If, instead, you want the latest devel release:
+
That will give you the latest stable release of PDL. If, instead, you want the latest devel release then you can:
<pre>
<pre>
-
ppm install http://www.sisyphusion.tk/ppm/PDL_dev.ppd
+
ppm install http://www.sisyphusion.tk/ppm/PDL_dev.ppd --force
</pre>
</pre>
-
 
+
but you might first want to check whether the devel release is later than the stable release - which you can do by [http://www.sisyphusion.tk/ppmindex.html comparing the listed version numbers].
-
You might first want to check that the current devel release is <b>later</b> than the current stable release - which is usually (but not always) the case.
+
-
For <b>all</b> of these packages, you can find out which version of the module is being provided by going to http://www.sisyphusion.tk/ppmindex.html and scrolling down to the appropriate entry.
+
OpenGL ppm packages are also available from other repos, but those packages are usually built against a <b>dynamic</b> freeglut library and they don't work well with the above PDL packages (which expect a <b>static</b> freeglut library). It's therefore advisable to install from the sisyphusion repo, as above.
OpenGL ppm packages are also available from other repos, but those packages are usually built against a <b>dynamic</b> freeglut library and they don't work well with the above PDL packages (which expect a <b>static</b> freeglut library). It's therefore advisable to install from the sisyphusion repo, as above.
Line 37: Line 38:
Once PDL has been installed, the following PDL-based packages (available from CPAN, but not part of the "core" PDL distribution) can also be installed:
Once PDL has been installed, the following PDL-based packages (available from CPAN, but not part of the "core" PDL distribution) can also be installed:
<pre>
<pre>
-
ppm install http://www.sisyphusion.tk/ppm/PDL-Audio.ppd
+
ppm install http://www.sisyphusion.tk/ppm/PDL-Audio.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-CCS.ppd
+
ppm install http://www.sisyphusion.tk/ppm/PDL-CCS.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-ColorSpace.ppd
+
ppm install http://www.sisyphusion.tk/ppm/PDL-Drawing-Prima.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-IO-HDF5.ppd  
+
ppm install http://www.sisyphusion.tk/ppm/PDL-EditDistance.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-NetCDF.ppd  
+
ppm install http://www.sisyphusion.tk/ppm/PDL-Fit-Levmar --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-Stats.ppd  
+
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-ColorSpace.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-VectorValued.ppd  
+
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-Gnuplot.ppd --force
-
and, for 64-bit perls only:
+
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-Prima.ppd --force
-
ppm install http://www.sisyphusion.tk/ppm/PDL-LinearAlgebra
+
ppm install http://www.sisyphusion.tk/ppm/PDL-IO-HDF5.ppd --force
 +
ppm install http://www.sisyphusion.tk/ppm/PDL-LinearAlgebra --force
 +
ppm install http://www.sisyphusion.tk/ppm/PDL-NetCDF.ppd --force
 +
ppm install http://www.sisyphusion.tk/ppm/PDL-Stats.ppd --force
 +
ppm install http://www.sisyphusion.tk/ppm/PDL-VectorValued.ppd --force
 +
ppm install http://www.sisyphusion.tk/ppm/PDL-Ngrams.ppd --force
</pre>
</pre>
Line 61: Line 67:
Affected perls are therefore any perl built from 5.10.0 source - eg Strawberry Perl 5.10.0. With ActivePerl, this broken DynaLoader.pm was included in some of their 5.8.x builds, as well as their first 5.10.0 build - though the error was fixed in their later builds (eg build 1005) of 5.10.0 . The error produced when trying to load the PGPLOT module using this broken DynaLoader.pm begins "Can't locate loadable object for module PGPLOT in @INC ...".
Affected perls are therefore any perl built from 5.10.0 source - eg Strawberry Perl 5.10.0. With ActivePerl, this broken DynaLoader.pm was included in some of their 5.8.x builds, as well as their first 5.10.0 build - though the error was fixed in their later builds (eg build 1005) of 5.10.0 . The error produced when trying to load the PGPLOT module using this broken DynaLoader.pm begins "Can't locate loadable object for module PGPLOT in @INC ...".
If you receive that error, then try installing an unbroken DynaLoader.pm (eg by copying one from a perl-5.10.1 installation) - or upgrade your perl to at least 5.10.1 (which is a safer option than copying a DynaLoader.pm from another installation).
If you receive that error, then try installing an unbroken DynaLoader.pm (eg by copying one from a perl-5.10.1 installation) - or upgrade your perl to at least 5.10.1 (which is a safer option than copying a DynaLoader.pm from another installation).
-
 
-
NOTE 3: When upgrading the above modules using those ppm commands, you may encounter an error message telling you that you need to use force. That is achieved by appending " --force" to the "ppm install ..." command.
 
-
 
-
 
-
== Installing PPM ==
 
-
If your perl doesn't have the ppm utility, you may try [http://www.sisyphusion.tk/libraries/PPM-2.50_01.tar.gz this] version - which is a slightly modified rendition of version 2.1.9 from CPAN.
 
-
Note that it's missing some features, but we can perhaps be prodded into doing something that improves that over time. (It should at least be capable of installing PDL as per the above instructions.)
 
-
 
-
Having downloaded [http://www.sisyphusion.tk/libraries/PPM-2.50_01.tar.gz that file], extract it to some location, then 'cd' to the top level source folder (ie, the folder that contains the Makefile.PL) and run, from the command line:
 
-
 
-
'''perl Makefile.PL'''
 
-
 
-
Pay attention to the output - if there any pre-requisite modules specified as missing, install them using the CPAN shell in the usual manner.<br>
 
-
Then, assuming that 'perl -V:make' reports that make is 'dmake', run:
 
-
 
-
'''dmake'''
 
-
 
-
(Otherwise run whatever it was that 'perl -V:make' reported.)
 
-
 
-
Then run:
 
-
 
-
'''perl pl2bat.fix'''
 
-
 
-
and finally:
 
-
 
-
'''dmake install'''
 
-
 
-
(Again, modify that last command in accordance with the 'perl -V:make' output, if applicable.)
 
-
 
-
You should then be able to install PDL and its pre-requisites by following the above instructions.
 
-
 
-
Here are some known deficiencies with this build of PPM:<br>
 
-
1) Will croak if it strikes a 'DEPENDENCY' entry in any of the XML that it reads (eg ppd file, package.lst, package.xml). 'DEPENDENCY' is deprecated, having been replaced by 'REQUIRE', with which this version of PPM has no problem. (Afaik 'DEPENDENCY' is not to be found in any of the bribes or sisyphusion XML);<br>
 
-
2) If there are multiple 'REQUIRE' entries, only the last one is processed - the rest are ignored.<br>
 
-
3) Running 'ppm search SomeModule' searches only the bribes and sisyphusion repos - you'll need to add any other repos that you want searched to ppm.xml yourself;
 
Please feel free to report any problems to either of the pdl mailing lists, or by emailing to sisyphus1 at (@) optusnet dot (.) com dot(.)au
Please feel free to report any problems to either of the pdl mailing lists, or by emailing to sisyphus1 at (@) optusnet dot (.) com dot(.)au

Revision as of 08:51, 24 January 2013

Although PDL is currently supported for perl versions back to 5.8.1, ppm packages are provided here only for 5.8.8 onwards. These instructions therefore relate only to perl 5.8.8 and later. (For 64-bit builds of perl, ppm packages are provided only for perl versions 5.12 and later.) It's also assumed that you have the PPM utility. If you don't have a correctly functioning version of the PPM utility then one option is to use PAR::Dist::InstallPPD to install the PDL ppm package - by, for example, using this script.
Alternatively, you could build PDL from source. (To build from source, see Win32\INSTALL in the PDL source distribution.)
If you prefer to use a ppm utility, and the perl you're using doesn't ship with one, then track down the latest version that the Strawberry Perl project provides.

Note that we now append '--force' to the ppm commands. This is explained in the sisyphusion FAQ (question 3).

First up install Astro::FITS::Header and Convert::UU by running:

ppm install http://www.sisyphusion.tk/ppm/Astro-FITS-Header.ppd --force
ppm install http://www.sisyphusion.tk/ppm/Convert-UU.ppd --force

Then install the PGPLOT (optional), OpenGL (prerequisite), File::Map (prerequisite) and PDL modules by running, from the command line:

ppm install http://www.sisyphusion.tk/ppm/File-Map.ppd --force
ppm install http://www.sisyphusion.tk/ppm/OpenGL.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PGPLOT.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL.ppd --force

That will give you the latest stable release of PDL. If, instead, you want the latest devel release then you can:

ppm install http://www.sisyphusion.tk/ppm/PDL_dev.ppd --force

but you might first want to check whether the devel release is later than the stable release - which you can do by comparing the listed version numbers.

OpenGL ppm packages are also available from other repos, but those packages are usually built against a dynamic freeglut library and they don't work well with the above PDL packages (which expect a static freeglut library). It's therefore advisable to install from the sisyphusion repo, as above.

Having installed the relevant ppm package, PLPLOT and PROJ4 support is enabled by setting the PLPLOT_LIB and PROJ_LIB environment variables to the location of the plplot_supp and proj_supp folders (respectively). The ppm post-install script will terminate with a message that tells you the settings these environment variables should take on. (If you missed the message, the two folders will be in your perl/site/lib directory - eg, for most builds of ActivePerl the PLPLOT_LIB environment variable needs to be set to C:\perl\site\lib\PDL\plplot_supp, and PROJ_LIB needs to be set to C:\perl\site\lib\PDL\proj_supp.)

Installing ffmpeg will enable the creation of mp4 and animated gif files, whereby one can turn a piddle of images into a movie. For a demo of this feature, create an mp4 file (bounce.mp4) by running the Example/IO/wmpeg.pl that ships with the PDL source. The requisite ffmpeg binaries are available from a number of places, including(at time of writing):

http://ffmpeg.arrozcru.org/autobuilds/
http://www.videohelp.com/tools/ffmpeg

but googling for 'ffmpeg download' should turn up useful hits if those 2 links become dead in the future.

Once PDL has been installed, the following PDL-based packages (available from CPAN, but not part of the "core" PDL distribution) can also be installed:

ppm install http://www.sisyphusion.tk/ppm/PDL-Audio.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-CCS.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-Drawing-Prima.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-EditDistance.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-Fit-Levmar --force
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-ColorSpace.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-Gnuplot.ppd --force 
ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-Prima.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-IO-HDF5.ppd --force
ppm install http://www.sisyphusion.tk/ppm/PDL-LinearAlgebra --force
ppm install http://www.sisyphusion.tk/ppm/PDL-NetCDF.ppd --force 
ppm install http://www.sisyphusion.tk/ppm/PDL-Stats.ppd --force 
ppm install http://www.sisyphusion.tk/ppm/PDL-VectorValued.ppd --force 
ppm install http://www.sisyphusion.tk/ppm/PDL-Ngrams.ppd --force

The PDL::Graphics::PLplot module is 'dual-lived' - ie, in addition to shipping with the above PDL ppm packages, it also exists as an extension on CPAN. These 2 versions of PDL::Graphics::PLplot are not always in sync. If you would like to override the version that shipped as part of the PDL ppm package with the latest CPAN version:

ppm install http://www.sisyphusion.tk/ppm/PDL-Graphics-PLplot.ppd --force

but it's probably a good idea to first check which of the 2 versions is the later before doing that.

ActiveState also usually provide ppm packages for PDL, but they lack the functionality of the build available from sisyphusion.tk - eg no Slatec, FFTW, GD, GSL, Minuit, PGPLOT, PLPLOT or PROJ4 support.

NOTE 1: If using ppm's gui to install from the sisyphusion repo, you need to exercise care to ensure that the PDL and OpenGL packages are, in fact, being installed from the sisyphusion repo, not from the ActiveState repo - hence the advice (above) to install these packages using the given "ppm install ..." commands, instead of using the gui.

NOTE 2: The mechanism that allows the PGPLOT module to load is broken in the 5.10.0 DynaLoader.pm. Affected perls are therefore any perl built from 5.10.0 source - eg Strawberry Perl 5.10.0. With ActivePerl, this broken DynaLoader.pm was included in some of their 5.8.x builds, as well as their first 5.10.0 build - though the error was fixed in their later builds (eg build 1005) of 5.10.0 . The error produced when trying to load the PGPLOT module using this broken DynaLoader.pm begins "Can't locate loadable object for module PGPLOT in @INC ...". If you receive that error, then try installing an unbroken DynaLoader.pm (eg by copying one from a perl-5.10.1 installation) - or upgrade your perl to at least 5.10.1 (which is a safer option than copying a DynaLoader.pm from another installation).

Please feel free to report any problems to either of the pdl mailing lists, or by emailing to sisyphus1 at (@) optusnet dot (.) com dot(.)au

Personal tools