Installing PySptools
********************

From version 0.12.1, PySptools can run under Python 2.7 and 3.3. It has been tested for these versions but can probably run under others Python versions.

.. note:: The porting under Python 3.3 is not integral. Because the SPy library run on Python <= 2.7 and as the spectro module use SPy, the spectro module is not part of the porting.

.. note:: The HSI cubes are, in general, large and the 64 bits version of Python is recommended.

The latest release is available at these download sites:

	* `pypi <https://pypi.python.org/pypi/pysptools>`_
	* `sourceforge <http://sourceforge.net/projects/pysptools/>`_ 
	* `softpedia <http://www.softpedia.com/get/Science-CAD/PySptools.shtml>`_

Manual installation
===================

To install download the sources, expand it in a directory and add the path of
the pysptools-0.xx.x directory to the PYTHONPATH system variable.

Distutils installation
======================

You can use Distutils (new for version 0.08 and above). Expand the sources in a directory,
go to the pysptools-0.xx.x directory and at the command prompt type 'python setup.py install'.
To uninstall the library, you have to do it manually. Go to your python installation. In the
Lib/site-packages folder simply removes the associated pysptools folder and files.

Using the faster version of NFINDR
==================================

The algorithm NFINDR have a cython version. This cython version run two times faster than the pure Python version. It is compiled for Windows 7 (maybe it work for vista and 8),
64 bits and the official Python 2.7 64 bits release. If it is your case, download
NFINDR_win_amd64-py2.7.zip, unzip and copy the nfindr.pyd file
to your installation in the endmembers extraction algorithms folder, something like lib\\site-packages\\pysptools\\eea
You can find this file on the sourceforge download site. To have more information on nfindr.pyd read the eea module documentation.

Dependencies
============

    * Python 2.7 or 3.3
    * Numpy, required
    * Scipy, required
    * scikit-learn, required
    * SPy, required (for Python 2.7)
    * Matplotlib, required
    * CVXOPT, optional, to run FCLS
    * IPython, optional, if you want to use the display feature

The development environment is a follow:

* For Python 2.7, the library is developed on the Windows platform, with: Python 2.7.5, 64 bits, numpy 1.8.2,
  scipy 0.12.0, SPy 0.11, Matplotlib 1.3.1, scikit-learn 0.13.1, CVXOPT 1.1.6 and IPython 2.2.0.

* For Python 3.3, the library is developed on the Windows platform, with: Python 3.3.5, 64 bits, numpy 1.8.1,
  scipy 0.13.3, Matplotlib 1.3.1, scikit-learn 0.15, CVXOPT 1.1.7 and IPython 2.2.0.