Tutorial: Map Algebra with PCRaster Python

4. Install Anaconda and libraries

For the next tutorials you need to install Anaconda and PCRaster on your computer and run the Jupyter Notebooks locally. You can use the instructions from the video above. Here are the steps:

1. Install Anaconda from here
2. Open Anaconda Prompt from the Windows Start Menu
3. Type:

conda create --name tutorials -c conda-forge pcraster spyder matplotlib jupyter pycrs numpy qgis

This will create a new environment with the name tutorials and will install the necessary libraries that we'll use.

4. Activate the new environment by typing

conda activate tutorials

5. Use the commands to go to the folder where you want to save the tutorials (note that the next step will create a subdirectory PCRasterTutorials there).

6. Go to https://github.com/jvdkwast/PCRasterTutorials

7. Click the Code button

8. Copy the HTTPS link

9. In the Anaconda prompt type:

conda install -c anaconda git

With this command we add the git library to our environment. With git we can interact with git repositories such as GitHub.

10. Now run the following command:

git clone https://github.com/jvdkwast/PCRasterTutorials.git

This will download all the tutorial materials of this and the next module to the subdirectory PCRasterTutorials.

To run the tutorials go to the subdirectory of the tutorial and run the command

jupyter notebook

This will open your browser and you can choose the notebook.

This video shows the procedure: