File: install_windows.rst

package info (click to toggle)
mapproxy 1.9.0-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 6,148 kB
  • sloc: python: 33,246; xml: 6,257; makefile: 194
file content (113 lines) | stat: -rw-r--r-- 4,461 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Installation on Windows
=======================

.. note:: You can also :doc:`install MapProxy inside an existing OSGeo4W installation<install_osgeo4w>`.

At frist you need a working Python installation. You can download Python from: http://www.python.org/download/. MapProxy requires Python 2.7, 3.3 or 3.4. Python 2.6 should still work, but it is no longer officially supported.


Virtualenv
----------

*If* you are using your Python installation for other applications as well, then we advise you to install MapProxy into a `virtual Python environment`_ to avoid any conflicts with different dependencies. *You can skip this if you only use the Python installation for MapProxy.*
`Read about virtualenv <http://virtualenv.openplans.org/#what-it-does>`_ if you want to now more about the benefits.

.. _`virtual Python environment`: http://guide.python-distribute.org/virtualenv.html

To create a new virtual environment for your MapProxy installation and to activate it go to the command line and call::

 C:\Python27\python path\to\virtualenv.py c:\mapproxy_venv
 C:\mapproxy_venv\Scripts\activate.bat

.. note::
  The last step is required every time you start working with your MapProxy installation. Alternatively you can always explicitly call ``\mapproxy_venv\Scripts\<command>``.

.. note:: Apache mod_wsgi does not work well with virtualenv on Windows. If you want to use mod_wsgi for deployment, then you should skip the creation the virtualenv.

After you activated the new environment, you have access to ``python`` and ``easy_install``.
To install MapProxy with most dependencies call::

  easy_install MapProxy

This might take a minute. You can skip the next step.


Setuptools
----------

MapProxy and most dependencies can be installed with the ``easy_install`` command.
You need to `install the setuptool package <http://pypi.python.org/pypi/setuptools>`_ to get the ``easy_install`` command.

After that you can install MapProxy with::

    c:\Python27\Scripts\easy_install MapProxy

This might take a minute.

Dependencies
------------

Read :ref:`dependency_details` for more information about all dependencies.


Pillow and YAML
~~~~~~~~~~~~~~~

Pillow and PyYAML are installed automatically by ``easy_install``.

PyProj
~~~~~~

Since libproj4 is generally not available on a Windows system, you will also need to install the Python package ``pyproj``.

::

  easy_install pyproj


Shapely and GEOS *(optional)*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shapely can be installed with ``easy_install Shapely``. This will already include the required ``geos.dll``.


GDAL *(optional)*
~~~~~~~~~~~~~~~~~

MapProxy requires GDAL/OGR for coverage support. MapProxy can either load the ``gdal.dll`` directly or use the ``osgeo.ogr`` Python package. You can `download and install inofficial Windows binaries of GDAL and the Python package <http://www.gisinternals.com/sdk/>`_ (e.g. `gdal-19-xxxx-code.msi`).

You need to add the installation path to the Windows ``PATH`` environment variable in both cases.
You can set the variable temporary on the command line (spaces in the filename need no quotes or escaping)::

  set PATH=%PATH%;C:\Program Files (x86)\GDAL

Or you can add it to your `systems environment variables <http://www.computerhope.com/issues/ch000549.htm>`_.

You also need to set ``GDAL_DRIVER_PATH`` or ``OGR_DRIVER_PATH`` to the ``gdalplugins`` directory when you want to use the Oracle plugin (extra download from URL above)::

    set GDAL_DRIVER_PATH=C:\Program Files (x86)\GDAL\gdalplugins


Platform dependent packages
---------------------------

All Python packages are downloaded from http://pypi.python.org/, but not all platform combinations might be available as a binary package, especially if you run a 64bit version of Windows.

If you run into troubles during installation, because it is trying to compile something (e.g. complaining about ``vcvarsall.bat``), you should look at Christoph Gohlke's `Unofficial Windows Binaries for Python Extension Packages <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_.

You can install the ``.exe`` packages with ``easy_install``::

  easy_install path\to\package-xxx.exe


Check installation
------------------

To check if the MapProxy was successfully installed you can call ``mapproxy-util``. You should see the installed version number.
::

    mapproxy-util --version


Now continue with :ref:`Create a configuration <create_configuration>` from the installation documentation.