Python Images

For Python models built in Akumen, it is possible to change the Python image being used to another image that we host in Docker. There are some situations where you may want to do this, such as if you want your model to run with a different Python version.

The Python image can be changed through the model’s properties and is specified using the ExecutionImage key. Where the ExecutionImage key is not provided, the 3.7.2 image is used so as to not potentially break existing Python models.

Warning

Python v3.7 is outdated and no longer supported by Python.
The 3.7.2 image is thus deprecated in Akumen and will be removed at a future date.
When this task is performed, models without the ExecutionImage key will default to using the latest image supported by Akumen.

If you wish to continue using the deprecated image after this time, please contact the Akumen support team to discuss your needs.

Changing the Python image can be done as follows:

  • Go to the Application Manager
  • Locate your Python model, right-click it and select “Properties”
  • Select the “Configuration” tab
  • The ExecutionImage key will appear as shown in the image below
    • If the ExecutionImage key does not exist, it can be manually added by typing into the window. Note that this window is in JSON format and requires that a comma is added to the previous line as shown in the image.
    • A value must also be provided. In the image below, 3.12-main is specified. Thus the entire line for the Execution image is: "ExecutionImage": "3.12-main"

Model Properties - Execution Image Model Properties - Execution Image

The Python packages supported in the “3.12-main” Python image are listed below.

Name Description
beautifulsoup4 Used to scrape data from HTML and XML files.
fiscalyear Provides the ability to query the fiscal year, fiscal quarter, fiscal month, and fiscal day of a date or datetime object
matplotlib Used for creating static, interactive, and animated visualisations in Python.
nbconvert The nbconvert tool allows conversion of Jupyter .ipynb notebook files into various static formats including: HTML. LaTeX. PDF.
networkx Used for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.
numpy-financial A collection of elementary financial functions.
openpyxl This library is used to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.
ortools Provides algorithms to narrow down a search set, in order to find an optimal (or close to optimal) solution.
pandas Used for working with data sets. Includes functions for analysing, cleaning, exploring, and manipulating data.
python-dateutil A predefined module in Python that helps you manipulate and work with dates and time stamps.
requests Used for making HTTP requests.
scipy A scientific computation library that uses NumPy underneath. It provides more utility functions for optimisation, stats and signal processing.
seaborn A Python data visualisation library based on matplotlib. Provides a high-level interface for drawing statistical graphics.

Troubleshooting

Akumen Message Issue Solution
Invalid setting in the model configuration for ExecutionImage String entered is null or empty Provide correct Python image name (e.g. 3.12-main). See image above.
You are using deprecated execution image. Consider switching to a supported image version An earlier version (e.g v3.7.2) is being used or “ExecutionImage” is not specified in the model configuration Use a later Python image version that is not deprecated (e.g. 3.12-main). See image above.
The container this model was running in could not find image The Python image could not be found Ensure that the Python image name is entered correctly (e.g. 3.12-main). See image above.