Python API for MES Infrastructure
Python API for MES Infrastructure
Overview
This is a Python API wrapper for the MES Infrastructure, allowing you to interact with MES models from Python code. Train and manipulate new models.
A prebuilt release is available on the Release page. The release is built with glibc 2.39 and works out of the box on systems with glibc ≥ 2.39 (such as Ubuntu 24.04). If you need to build from source, follow the steps below.
Installation Steps
- Install required system libraries:
- Compile the Boost library from source.
- Edit
Internal/MedPyExport/generate_binding/CMakeLists.txtand add:Set this path to your Boost build directory (WORK_BUILD_FOLDERfrom step 2). Make sure the compiled libraries are in/libsand headers in/include. - Ensure NumPy is installed:
This API supports both NumPy 1.x and 2.x. For maximum compatibility, compile with NumPy 2.x (works for clients with either version). Compiling with NumPy 1.x will not work for clients using 2.x.
- Build the Python API:
A full docker image for compilation steps can be found under this link:
- 01.basic_boost A base docker image with Boost
- 04.medpython A build with the python. Please edit, install your python version in the build. This will use the python 3.10 that was shipped with ubuntu 22.04. If you need a different version, please install it inside the docker before executing the setup script