Installation

This section explains how to install rastereasy and integrate it into your Python environment.

With pip

You can install rastereasy using pip, which is the simplest method:

$ pip install rastereasy

From source

To install rastereasy from source:

  1. Clone the repository from GitHub:

    $ git clone https://github.com/pythonraster/rastereasy.git
    
  2. Navigate to the repository’s root directory:

    $ cd rastereasy
    
  3. Install the package using pip:

    $ pip install .
    

Note for jupyter-lab users

As illustrated, rastereasy supports interactive plotting of spectral bands for individual pixels.

To enable this functionality in Jupyter Notebook, rastereasy installs some Jupyter extensions in your environment. If it doesn’t work, you may need to rebuild jupyter by the command:

` jupyter lab build `

Note for Google-colab users

As illustrated, rastereasy supports interactive plotting of spectral bands for individual pixels.

To enable this functionality in Google Colab, a special two-step setup is required. Follow these steps in the exact order. Separating the commands into different cells and restarting the session is essential.

Step 1: Install Libraries

Run the following cell to install rastereasy and the necessary dependencies for interactive widgets.

!pip install rastereasy ipympl
from google.colab import output
output.enable_custom_widget_manager()

Step 2: Restart the Runtime

After the installation is complete, you must restart the runtime.

Go to the menu: Runtime > Restart runtime (or use the shortcut Ctrl+M).

Step 3: Run Your Code

After restarting, you can now enable the interactive mode and use the library in a new cell.

%matplotlib widget
import rastereasy