2.3. Installation in Debian/Ubuntu Linux
2.3.1. QGIS download and installation
Open a terminal and type:
sudo apt-get update
Press Enter and type the user password;
Type in a terminal:
sudo apt-get install qgis python3-matplotlib python3-scipy
Press Enter and wait until the software is downloaded and installed.
Now, QGIS is installed.
2.3.2. Installation of required dependencies
The Semi-Automatic Classification Plugin requires Remotior Sensus, GDAL, NumPy and SciPy for most functionalities. Optionally, scikit-learn and PyTorch are required for machine learning.
Therefore, we need to install the dependencies that are not included in the QGIS installation.
Open the terminal (administrative rights may be required);
Enter the following command:
pip3 install --upgrade remotior-sensus scikit-learn torch
In case you get an error message related to externally managed environment,
you may use (at the risk of breaking the OS or the Python installation)
--break-system-packages; alternatively, it is possible to
create a virtual environment
python3 -m venv env, install the packages
in it, and start QGIS from the activated environment.
Follow the same procedure for updating the dependencies.
In case the library Remotior Sensus is not found, an automatic procedure will try to download it in the plugin directory, allowing for using the main functions of the Semi-Automatic Classification Plugin; however, this is not recommended as library Remotior Sensus won’t be updated, and scikit-learn and PyTorch functions will not work. Alternatively, one may follow Advanced installation using Conda.
2.3.3. Semi-Automatic Classification Plugin installation
From the main menu, select
Manage and Install Plugins;
From the menu
All, select the Semi-Automatic Classification Plugin and click the button
The SCP should be automatically activated; however, be sure that the Semi-Automatic Classification Plugin is checked in the menu
Installed(the restart of QGIS could be necessary to complete the SCP installation);
2.3.4. Configuration of the plugin
Now, the Semi-Automatic Classification Plugin is installed and a dock and a toolbar should be added to QGIS. Also, a SCP menu is available in the Menu Bar of QGIS. It is possible to move the toolbar and the dock according to your needs, as in the following image.
The configuration of available RAM is recommended in order to reduce
the processing time.
From the SCP menu select
Settings > Processing .
In the Settings, set the
Available RAM (MB) to a value that
should be half of the system RAM.
For instance, if your system has 2GB of RAM, set the value to 1024MB.
2.3.5. Update of required dependencies
The dependency Remotior Sensus is frequently updated. The Semi-Automatic Classification Plugin can check automatically if a new version is available, and display a message in the SCP dock.
It is recommended to close QGIS and update Remotior Sensus following the same installation steps described in Installation of required dependencies .