PREREQUISITIES
==============

pyModis requires Python, which comes preinstalled on most Unix machines. 

You can check to see if you have it installed on a Unix machine by typing Python at a command prompt.
A result like this and you have Python istalled

    Python 2.6.6 (r266:84292, Oct  9 2010, 11:40:09) 
    [GCC 4.4.5] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

The next error however means that there is a problem:

    bash: python: command not found

You can download Python from http://www.python.org/download/releases/

It also requires the Python package of GDAL library (commonly named "python-gdal")

INSTALL
========

Using pip
^^^^^^^^^^

You can use pip to install pyModis

    pip install pyModis

To upgrade version

    pip install --upgrade pyModis

To uninstall

   pip uninstall pyModis

From source
^^^^^^^^^^^^

Download the last stable version from Github


Now decompress the archivie

    tar -xzf pyModis.tar.gz


Enter inside the new directory

    cd pyModis


Install the library with root permission

    su
    python setup.py install


on Ubuntu

    sudo python setup.py install


Now we can try to load the library so

    python

    Python 2.6.6 (r266:84292, Oct  9 2010, 11:40:09) 
    [GCC 4.4.5] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pymodis

with this response it is all ok

    >>>

instead with this one, you must check the installation

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named pymodis

Windows
^^^^^^^^^

The most simple way to install pyModis on Windows is to install latest Python 2.7 from http://python.org/download/

Now you have to modify the "Path" environment variable using Powershell running

    [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

Download and install the last version of Distribute for Windows from http://python-distribute.org/distribute_setup.py

At this point you can install pip using easy_install

    easy_install pip

Now install `numpy <http://www.numpy.org>`_ library using *easy_install* because installation from pip is broken (this is required only for version >= 0.7.1)

    easy_install numpy

Finally install pyModis using pip

    pip install pyModis

