Windows quick start guide

To get the PCRaster software up and running please follow the steps outlined below. You will need to configure two packages, a Python environment and the PCRaster software.

There are several Python environments available such as WinPython or Anaconda, or Enthought Canopy. Our experience is that installing PCRaster Python is currently most straightforward with the standard Windows version of Python. Below, we explain the installation of PCRaster Python using IDLE as the Python environment.

1) Installing the Python environment

a) Installing the Python IDLE environment

Go to  Python downloads and download Python 3.6.6, use the ‘Windows x86-64 executable installer’. After selecting the link, select ‘run the file’, and to customise Python, select ‘Add python.exe to path’, ‘Entire feature will be installed on local harddrive’.

b) Installing the Python NumPy module

After you have installed Python, you need to install the Python NumPy module. Ensure that you use the correct Python version while installing NumPy in case you already have several Python versions installed.

On your computer, go to: Start, All Programs, Python 3.6, ‘Python 3.6 (64-bit)’. Do not select IDLE. In the black command prompt window type:

import subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "numpy"])

2) Installing PCRaster

a) Download the required software packages

Download the PCRaster package.

b) Configure the software packages

Set up the PCRaster package by:

A. Unzipping the PCRaster package

In general, the PCRaster package can be extracted to any location on the hard disk. We recommend to choose a typical location, for example
In case you are not allowed to write to C:, choose  another location (e.g. D:\pcraster-4.2.1). Please check the contents of the folder, it should contain the folders bin, doc, lib, python, and share.

Note: Please write down the path where you extracted the PCRaster package. In the following, we will use the path C:\pcraster-4.2.1 in our instructions, please use your path instead.

B. Updating the PATH environment variable

The PATH environment variables must be updated such that PCRaster command line applications (a.g. aguila, pcrcalc, mapattr, …) can be executed on the Windows Command Prompt.

The PATH environment variable can be changed on Windows 7 as follows:

  1. Right-click on Start, and then Open Windows Explorer.
  2. Right-click on Computer, then Properties.
  3. In the System Control Panel, click Advanced System Settings.
  4. Click the Advanced tab.
  5. Click Environment Variables.
  6. Be careful with the following two steps, and do not delete or modify one or more of the existing entries (unless you really know what you are doing)
  7. In the User variables section, either select the PATH variable and click edit, or add a new variable and name it PATH
  8. Add the path of the bin directory of the extracted PCRaster package to the Variable value field, e.g.
    using Edit, New and Browse. Make sure that no quotation marks or semicolons are included.

C. Updating the PYTHONPATH environment variable

To use the PCRaster Python module you need to update the PYTHONPATH environment variable. Continue with (or perform steps B1- B6)

  1. In the User variables section, either select the PYTHONPATH variable and click edit, or add a new variable and name it PYTHONPATH
  2. Add the path of the python directory of the extracted PCRaster package to the Variable value field, e.g.
    using Edit, New and Browse. Make sure that no quotation marks or semicolons are included.

Click ok to confirm your modifications.

3) Test your setup

Note: you need to start a new command prompt or to restart IDLE, the new environment variables will not affect open command prompts or IDLE sessions.

A. Testing the PCRaster Python module

Start IDLE and type:

from pcraster import *
setclone(10, 10, 1, 1, 1)

PCRaster works properly when a map is displayed by aguila.

B. Testing the PCRaster command line applications

Click on Start and type cmd in the Search programs and files to start the Windows Command Prompt. Type:
You should see a message similar to:
pcrcalc Dec 13 2018 (win64/msvc)
USAGE: pcrcalc [options] "expression"
or     pcrcalc [options] -f scriptFile
( or #!: pcrcalc -F [options]+)
other flags:
s #  : set seed (integer > 0) for random generator
default is based on current time
b f  : overrule script bindings
1    : update timeseries files at end of each timestep
r f  : set run directory
d f  : debug mode, check MV creation on assignment
comparing against clone or areamap boolean mask
c    : strict Case significant filename check (Unix portability)
p    : print profile information
m    : optimize with areamap MV compression
l    : use less memory but more temporary disk storage
t    : test argument substitution


Please post questions regarding installation, applications or operations of the PCRaster package on our mailing list.