No worries! If you are using Linux or MacOS, 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 ...
|
Install "SciPDL" binary. This comes with:
apt-get install pdl pgplot5 libpgplot-perl
yum install perl-PDL perl-PDL-Graphics-PLplot plplot-perl
Note: Does not include PGPLOT.
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.
urpmi perl-PDL
Note: Does not include PGPLOT, PLplot, OpenGL.
yast -i perl-PDL
Note: Does not include PGPLOT, PLplot, OpenGL.
The absolute easiest way: Strawberry Perl produces a portable PDL edition that includes Perl, PDL and related modules and external libraries.
Alternate easy way: If you already have a version of Perl that uses the ppm utility (Strawberry Perl or ActiveState Perl), you can install via ppm:
ppm install Astro-FITS-Header ppm install Convert-UUThen install the OpenGL, PGPLOT and PDL modules from the sisyphusion repo by running:
ppm install https://www.sisyphusion.tk/ppm/OpenGL.ppd ppm install https://www.sisyphusion.tk/ppm/PGPLOT.ppd ppm install https://www.sisyphusion.tk/ppm/PDL.ppd
If you have problems with uninstalled prerequisites see the sisyphusion FAQ. For more details see Installing PDL on Windows on the wiki or the win32/INSTALL file in the PDL source distribution.
Tested: Ubuntu 10.04 LTS (Lucid Lynx).
Tested: Debian 5.05 Stable (Lenny).
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.
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.
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
Tested: Mandriva 2010 Spring.
Note: You must run the following commands a root.
Required: Build environment.urpmi gcc make perl-develRecommended: PLplot
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.
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:
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
perl -MCPAN -e shell cpan> install PDL
Note: Installs all of PDL that is supported by available dependencies.
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: MetaCPAN as an alternate way to get the latest release and information about PDL.