Install PDL
New to Perl?
No worries! If you are using Linux or Mac OS X, you should already have Perl installed. If you are a Windows user, you can use Strawberry Perl or Active Perl.
I am looking for ... |
Pre-Built BinariesMy platform is ...
Source InstallationMy platform is ...
|
Easiest install - Mac OS X
Install "SciPDL" binary. This comes with:
- PDL 2.015 and its perl module dependencies
- perl 5.22.1
- Other perl modules:
- ExtUtils::F77 1.19
- Astro::FITS::Header 3.07
- Astro::FITS::CFITSIO 1.10
- PGPLOT 2.21
- PDL::FFTW3 0.04
- Term::ReadLine::Gnu 1.25
- Other support libraries (modified to live within /Applications/PDL/...):
- pgplot 5.3.1
- libpng 1.2.8
- zlib 1.2.3
- fftw 3.3.4
- cfitsio 3.370
- gsl 1.16
- readline 5.1
Easiest install - Ubuntu / Debian
apt-get install pdl pgplot5 libpgplot-perl
Easiest install - Fedora
yum install perl-PDL perl-PDL-Graphics-PLplot plplot-perl
Note: Does not include PGPLOT.
Easiest install - Gentoo Linux
Update the available list of packages by typing on a terminal as root
emerge --sync
Install the relevant PDL Gentoo packages by typing (again as root)
emerge dev-perl/PDL
Note: There is a known issue with writing 16bit PNG/PNM/PGM/PPM images.
Easiest install - Mandriva
urpmi perl-PDL
Note: Does not include PGPLOT, PLplot, OpenGL.
Easiest install - OpenSUSE
yast -i perl-PDL
Note: Does not include PGPLOT, PLplot, OpenGL.
Easiest install - Windows
To install via ppm for Strawberry Perl (32-bit only) and ActiveState Perl (32-bit and 64-bit):
ppm install Astro-FITS-Header ppm install Convert-UUThen install the OpenGL, PGPLOT and PDL modules from the sisyphusion repo by running: For 32-bit builds of perl (versions 5.8 and later):
ppm install http://www.sisyphusion.tk/ppm/OpenGL.ppd ppm install http://www.sisyphusion.tk/ppm/PGPLOT.ppd ppm install http://www.sisyphusion.tk/ppm/PDL.ppdFor 64-bit builds of perl, ppm packages are provided only for perl versions 5.10 and later. Also, there are no PGPLOT packages for these builds - so just run:
ppm install http://www.sisyphusion.tk/ppm/OpenGL.ppd ppm install http://www.sisyphusion.tk/ppm/PDL.ppd
For more details see Installing PDL on Windows on the wiki or win32/INSTALL file in the PDL source distribution.
Source install - Windows
- Install Cygwin
- See "Installing PDL on Cygwin" on the wiki.
Source install - Ubuntu / Debian
Tested: Ubuntu 10.04 LTS (Lucid Lynx).
Tested: Debian 5.05 Stable (Lenny).
- Notes:
-
Ubuntu users: Run these commands with sudo.
Debian users: Run these commands as root.
apt-get install gcc makeRecommended: PGPLOT library (Debian: enable lenny/non-free and squeeze/contrib)
apt-get install libpgplot-perlRecommended: PLplot library (Problems with Debian)
apt-get install libplplot-devRecommended: Improved PDL shell
apt-get install libdevel-repl-perl cpan Devel::REPLRecommended: Proj4 library (Debian: enable squeeze/main)
apt-get install libproj-devOptional: Minuit and Slatec libraries
apt-get install gfortran libextutils-f77-perlOptional: NetPBM image utilities
apt-get install netpbmOptional: GD image library
apt-get install libgd2-xpm-devOptional: GNU Scientific Library
apt-get install libgsl0-devOptional: FFTW library
apt-get install fftw-devOptional: HDF4 library (Debian: enable squeeze/main)
apt-get install libhdf4-devInstall PDL.
cpan PDL
Note: The pgplot test opens a window and you have to close it. If the install seems to "hang", look for an open pgplot window.
Missing: NDF support.
Source install - Fedora
Tested: Fedora Core 13 & 14.
Note: You must run the following commands a root.
Required: Build environment.yum install gccRecommended: 3D Graphics
yum install libXi-devel libXmu-devel freeglut-devel perl-OpenGLRecommended: PLplot library
yum install plplot-develRecommended: Improved PDL shell
yum install perl-Devel-REPL perl-Term-ReadLine-GnuRecommended: Proj4 library
yum install proj-devel proj-nadOptional: Minuit and Slatec libraries (you must disable SELinux).
yum install compat-gcc-34-g77 perl-ExtUtils-F77Optional: NetPBM image utilities
yum install netpbm-progsOptional: GD image library
yum install gd-develOptional: GNU Scientific Library
yum install gsl-develOptional: FFTW library
yum install fftw2-develOptional: HDF4 Library
yum install hdf-develNow install CPAN and then PDL
yum install perl-CPAN cpan PDL
Missing: PGPLOT (but see below) and NDF support.
Common Problems
If you installed gfortran and ExtUtils::F77 but did not get the Slatec and Minuit libraries, try disabling SELinux (and install PDL again).
/usr/sbin/setenforce 0 ## Disable SELinux at boot - set SELINUX=disabled in the config file. vi /etc/selinux/configPGPLOT is not distributed by Fedora as it is not free software. But if you install the RPM Fusion Non-free Yum repository (look under "Command Line Setup Using RPM" here), then you may simply run
yum install pgplot-devel cpan PGPLOT cpan PDL
Source install - Mandriva
Tested: Mandriva 2010 Spring.
Note: You must run the following commands a root.
Required: Build environment.urpmi gcc make perl-develRecommended: PLplot
- urpmi cmake gcc-c++ gcc-gfortran
- Download the latest version from http://www.plplot.org
- Unpack the tar.gz file
-
mkdir build_dir cd build_dir cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../plplot-5.9.6 make make install
urpmi gcc-gfortran perl-ExtUtils-F77Optional: NetPBM image utilities
urpmi netpbmOptional: GNU Scientific Library
urpmi libgsl-develOptional: FFTW library
urpmi fftw2-develInstall PDL
cpan PDL
Missing: OpenGL, PGPLOT, PDL2 shell, Proj4, GD, HDF4 and NDF support.
Common problems
Mandriva's packages for Proj4, GD and HDF4 are known to have problems with PDL. You might see an error like:
make[3]: *** [SD.o] Error 1 make[3]: Leaving directory `/root/.cpan/build/PDL-2.4.6_992-20Qukl/IO/HDF/SD' ... make: *** [subdirs] Error 2 CHM/PDL-2.4.6_992.tar.gz /usr/bin/make -- NOT OK
If this happens, you have two options:
- You can remove the offending libraries and run cpan PDL again.
- You can use the commands below to configure the installer
to ignore these libraries:
perl -MCPAN -e shell cpan> look PDL # Disable PROJ perl -pi -e 's|WITH_PROJ => undef|WITH_PROJ => 0|' perldl.conf # Disable HDF4 perl -pi -e 's|WITH_HDF => undef|WITH_HDF => 0|' perldl.conf # Disable GD perl -pi -e 's|WITH_GD => undef|WITH_GD => 0|' perldl.conf # Install perl Makefile.PL make make test make install exit cpan> exit
Source install - Mac OS X
See "Installing PDL on Mac OS X" on the wiki.Source install - CPAN (all platforms)
perl -MCPAN -e shell cpan> install PDL
Note: Installs all of PDL that is supported by available dependencies.
Source install - Manual install (all platforms)
Download sources from SourceForge and extract.
perl Makefile.PL
make
make test
make install
Note 1: On Windows, replace 'make' with 'dmake'. If you have trouble, or want more details, visit the complete manual installation page on the wiki.
Note 2: Search CPAN as an alternate way to get the latest release and information about PDL.