Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

The previous setup of pywps is outdated as it was based on old versions of the WPS 1.0.0 implementation. WPS2.0.0 was launched early 2018. But there are still a lot of applications to be found based on WPS1.0.0 implemented by PyWPS. Here a very short manual with thanks to Maarten Pronk (Deltares) for an easy installation, the former one causes a lot of stress. 

Step 1 Install Anaconda

Start with installing Anaconda for Python2.7. Recepies for WPS2 implemented by PyWPS4 on Linux will be published later on this year.

The following packages are required and can be installed via Conda and pip.

Code Block
conda install lxml=3.5.* gdal=1.10.* -c conda-forge
pip install pywps==3.2.6 --no-deps

Note! This has to be done using a command prompt opened as administrator.

Following steps can be done in any matter.

Step 2 Configure PyWPS

  1. Create a folder called c:\pywps\pywps_processes
  2. Add the file default.cfg (from c:\pywps\pywps) into it. If you like you can insert your own information in the file. 
    However, do not forget to :
    1. Set the correct path for tempPath(c:/pywps/temp) under [server] section.
    2. Set outputPath (c:/[webserver]/htdocs/wps/wpsoutput) under [server] section.
    3. Set processesPath to c:/pywps/pywps_processes
    4. Set the logFile to somewhere (c:/pywps/log)

The path slashes should conform to python conventions, which happen to be the same as the linux slash convention, and not the windows convention. Note that python paths should never end with a slash!

Step 3 Configure Apache

Navigate to the Apache folder.

If the Apache web server is not installed in your machine yet, download the newest stable release of Apache (

After installation, in the Apache folder c:\Program Files (x86)\Apache Software Foundation\Apache2.4 you find a sub folder called cgi-bin.

Create an empty file called pywps.cgi in this folder and insert the following code in it, after checking the python path (and correcting it: for example if you have Python2.7 installed, the first line should be #!c:\python27\python.exe): Note for anaconda users this should be #!c:/anaconda/python.exe and the MPLCONFIGDIR should be C:/Anaconda/Lib/site-packages/matplotlib/mpl-data



#!C:\program files\anaconda2\python.exe
import sys
sys.path.insert(0, r"C:/pywps")
import os
# Note that WPS runs as apache user and not as you, so many more user variables might be needed.
# Restart Apache after adding one.
import wps

Step 4 First test of WPS

Test your WPS by starting Apache server and navigate to http://localhost/cgi-bin/pywps.cgi  The result should be something similar to this, meaning that the pywps process runs correctly inside the apache web server.



    <Exception exceptionCode="NoApplicableCode">
        <ExceptionText>'No query string found.'</ExceptionText>


Step 5 Testing WPS behavior

Now pywps runs, test for correct WPS behavior in browser using the syntax in WPS Primer. In c:\pywps\tests\processes some example processes are included, copy its entire contents to the c:\pywps\pywps_processes folder (that you configured as processesPath=c:/pywps/pywps_processes in c:\pywps\pywps_processes\default.cfg) and find out whether you can get them to run. First test the GetCapabilities request:



<wps:Capabilities service="WPS" version="1.0.0" xml:lang="en-CA" xsi:schemaLocation="http:/" updateSequence="1">


and then executing any of the available processes
e.g. http://localhost/cgi-bin/pywps.cgi?service=wps&request=Execute&Identifier=dummyprocess&DataInputs=\[input1=42\]&version=1.0.0.

Step 6 Add wps processes

Now add your own Python processes as WPS by copying your processes to the c:\pywps\pywps_processes folder too. Use the WPS syntax (Setting up a WPS process using PyWPS) for your python functions as in the copied examples. Change 3 things when adding a new WPS process based on these examples:

  1. add new file to c:/pywps/pywps_processes
  2. change identifier inside
  3. add "" to c:/pywps/pywps_processes/