Back to Main Menu

QGIS Install Integration Package

Introduction

The assetic_qgis integration package is a python package that can be implemented in a QGIS python environment.

 

This package utilises QGIS libraries to assist with accessing the spatial and attribute data in QGIS for use with creating and updating records in Assetic.

 
Note: This integration is designed to be used with QGIS version 3

 

Installation of assetic-qgis Package

It is assumed that the python 'pip' utility has been installed as part of the QGIS installation.

 

To install the 'assetic-qgis' package open a windows Command Prompt window in 'Administrator' mode.
The QGIS environment needs to be set so that pip installs the packages to the correct location.

 

First navigate to the QGIS install folder ("C:\Program Files\QGIS 3.10" in the example below).  Next run the batch file OSGeo4W.bat:

 

When the batch file executes it prints the following to the command prompt window:

"run o-help for a list of available commands"

 

This indicates the batch file has been successfully executed.

Next set the Python 3 environment via the following command (this command is created when OSGeo4W.bat is run):

py3_env

 

In newer versions of QGIS (v3.20 and higher) the command to set the Python 3 environment has changed to the following command, instead:

o4w_env

 

After setting the Python environment, run the following command to install the assetic_qgis integration package:

pip install assetic-qgis

If the 'assetic-qgis' package is already installed and you wish to upgrade it, include the "--upgrade" keyword in the pip command as shown below:

pip install assetic-qgis --upgrade --upgrade-strategy only-if-needed

 

Refer to the article Assetic-Python-SDK-Quick-Start for more details on how to use pip to install Assetic packages.

 
Note: The article Assetic-Python-SDK-Quick-Start includes a hint for installing the package from a Python window (using pip).  This may be useful if you are not sure how to run python from a command prompt.

 

To verify that the 'assetic-qgis' and 'assetic' packages have installed:

  1. Restart QGIS.
  2. Open the Python console in QGIS.

  3. In the console widow type the following python command and hit enter:
    import assetic


  4. If there is a problem with the assetic install there will be error messages, if not the command prompt returns with no message.  When the prompt returns type in the following command to verify the assetic package version:
    assetic.__version__.__version__
  5. Next check the assetic_qgis package by typing the python command:
    import assetic_qgis
  6. If there is a problem with the assetic_qgis install there will be error messages, if not the command prompt returns with no message.  When the prompt returns type in the following command to verify the assetic_qgis package version:
    assetic_qgis.__version__