 Hello, I'm Hans van der Kwaas, Senior Lecturer at IHE Delft Institute for Water Education. In this video I'm going to show you how to install PCRuster. PCRuster is an environmental modeling language which comes as a library in Python. You can use it to do map algebra and to make spatial dynamic models. PCRuster is developed and maintained by Utrecht University Department of Physical Geography. You can find the website with all the information at PCRuster.eu. If you want to install PCRuster we can do it for Windows or Linux and we're going to demonstrate in this video how to do that for Windows. There's a quick installation guide that you can follow which is posted on the website. And what we're first going to do is to install the Python environment and we are going to use in this video Anaconda which is a distribution that is free and comes with a lot of tools already that are useful for us. So first you need to install Anaconda, the distribution that we're going to use. You can find it at anaconda.com and then you click the download button. You see here that it comes with Python 3.7 or with Python 2.7. PCRuster uses Python 3.6. So we're going to install Python 3.7 but then later I will show you how to set up an environment for PCRuster using Python 3.6. You also need to know if you use a 32-bit or 64-bit computer. In my case I use the 64-bit installer. After installation of Anaconda we need to set up the right environment to use PCRuster. So PCRuster as said uses Python 3.6. Anaconda comes with a tool which is called Anaconda Navigator. This is a tool that you can use to set the environment. Environments are separate versions of Python and libraries that you use for a certain purpose and that you can set up with Anaconda Navigator. So you find in Anaconda Navigator environments and by default you have the base root which contains Python 3.7 and some more libraries. We're going to make a new one and we'll call that PCRuster. As you see we can indicate here the Python version and we're going to use Python 3.6. When I click create, Python 3.6 will be installed in this new environment which we call PCRuster. Besides Python 3.6 we need to install some other packages for PCRuster. As we can see here in the quick start manual we need the NumPy module. So that's very easy to install so we have to install it in the PCRuster environment. So I'm going to not install and I search here for NumPy and I find it here and I check the box and I do apply. Now it will install NumPy in this environment. It says there are some dependencies that also need to be installed so let's do that. We also need to install Spyder which is the IDE interactive development environment that we are going to use to write our scripts. It has also some dependencies and then we install Spyder. Last but not least we also need to install Gdoll. Gdoll is useful for importing different raster formats and exporting it to other formats or reprojections and all kinds of things we can do with it. So we also accept here the dependencies and we install it. Okay it's installed so what we can do now is install PCRuster. PCRuster doesn't really come with an installer. It comes with a zip file and you need to put it in the right place. So I'm going to download the PCRuster package and extract it under C program files. After that I need to set some parts. So you can set the parts if you go to your file explorer and you click right on this PC under Windows 7 it's my computer and you go to properties and there you can go to advanced system settings and here you can set the environment variables. So what we first going to do is under paths we're going to add a new one. So we do edit and we're going to create a new one and we need to paste there the path to the bin folder of PCRuster. So we see PCRuster 421 bin if I click here on the icon I can see the path and I can do control C to copy it and I'll paste it here in this folder. And I'm going to move this up and I'll do OK. Now we also need to say where the Python path is. So we're creating a new user variable and we call it the Python path and that's basically the Python folder under PCRuster so there's here Python. We do the same trick we copy the path and then in the environment we can do new and we call the new one Python path and we paste here variable okay. So here Python path and then the path to Python. Okay the environment settings are set we do OK. And now we can test our setup. So what we're going to do is you're going to use Anaconda for this. So I go to the Anaconda prompt and you see here base. So here we use the base functionality of Anaconda but we also made that PCRuster environment so I can do conda activate PCRuster. And now you see that PCRuster is indicated here. That's just that we have the Python in the right environment. So if I type now Python you will see that it's 3.6.9 and I can do from PCRuster import and if that doesn't give an error then it means that PCRuster is working in this environment. It doesn't give an error so that's okay. So I close this prompt by Ctrl Z and I can also check if the native PCRuster functions work so I can do PCRulk and it gives me how PCRulk works so that means that the path is set okay. In practice we want to program our PCRuster Python code in spider in the IDE. So we start the spider within brackets the PCRuster environment and then we can test also some functionality. So now we can import the PCRuster library in the IPython console and we can create a little map with a set clone function, a map of 10 by 10 cells and we make a uniform distribution that we are going to visualize and if this shows up it means that everything is set up well and you're ready to program your dynamic models with PCRuster and you do that normally on the left side of the screen where you can make your script files. For more information on PCRuster I can refer to the PCRuster website which has quite some documentation and I can also recommend to subscribe to the PCRuster mailing list where people are active to answer your questions.