Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Mage ai Mage ai Python 3 9 Runtime

From Leeroopedia


Knowledge Sources
Domains Infrastructure, Data_Integration
Last Updated 2026-02-09 07:00 GMT

Overview

Python 3.9+ runtime environment required for the mage-integrations data pipeline framework.

Description

This environment defines the Python runtime and core system-level dependencies needed to run the mage-integrations framework. The framework is a Singer-based ETL system supporting dozens of source and destination connectors. Python 3.9 is the minimum supported version, but different Python minor versions (3.11, 3.12) trigger different dependency version selections for database drivers and utility libraries.

Usage

Use this environment for any mage-integrations workflow: source extraction, destination loading, connector development, or integration testing. It is a prerequisite for every Implementation in the mage-integrations framework.

System Requirements

Category Requirement Notes
OS Linux, macOS, or Windows Cross-platform; no OS-specific constraints
Python >= 3.9, < 4.0 setup.py enforces >= 3.9; pyproject.toml allows >= 3.8 but setup.py is authoritative
Disk 500MB+ For installed packages and connector schemas

Dependencies

Core Python Packages

  • `singer-sdk` ~= 0.34.1
  • `requests` ~= 2.31.0
  • `simplejson`
  • `python-dateutil` == 2.8.2
  • `jsonschema` (via singer-sdk)
  • `pandas` (imported in sources/base.py)
  • `backoff`
  • `paramiko` == 3.5.1
  • `sshtunnel` == 0.4.0
  • `pyarrow` >= 14.0.1
  • `protobuf` >= 4.25.0
  • `httpx` >= 0.27.0

Python Version-Conditional Packages

Python < 3.11:

  • `mysql-connector-python` ~= 8.4.0
  • `couchbase` == 4.1.1
  • `google-analytics-data` == 0.14.2
  • `google-cloud-bigquery-storage` == 2.16.2

Python >= 3.11:

  • `mysql-connector-python` ~= 9.0.0
  • `couchbase` == 4.3.5
  • `google-analytics-data` == 0.15.0
  • `google-cloud-bigquery-storage` == 2.26.0

Python < 3.12:

  • `pendulum` == 2.1.0
  • `oracledb` == 1.3.1
  • `pyodbc` == 4.0.35
  • `attrs` == 22.2.0

Python >= 3.12:

  • `pendulum` == 3.0.0
  • `oracledb` == 2.4.1
  • `pyodbc` == 5.0.1
  • `attrs` == 24.2.0

Credentials

No framework-level credentials are required. Individual source and destination connectors require their own credentials (API keys, database passwords, etc.), which are passed via the connector's `config.json` file at runtime.

Quick Install

# Install the mage-integrations package (core dependencies)
pip install mage-integrations

# Or install from source
cd mage_integrations && pip install -e .

Code Evidence

Python version enforcement from `mage_integrations/setup.py:34`:

python_requires='>=3.9',

StrEnum fallback for Python < 3.11 from `mage_ai/shared/enum.py:1-8`:

try:
    # breaking change introduced in python 3.11
    from enum import Enum, IntEnum, StrEnum
except ImportError:
    from enum import Enum, IntEnum

    class StrEnum(str, Enum):
        pass

Version-conditional dependency from `mage_integrations/requirements.txt:24-25`:

mysql-connector-python~=8.4.0; python_version < '3.11'
mysql-connector-python~=9.0.0; python_version >= '3.11'

Common Errors

Error Message Cause Solution
`python_requires='>=3.9'` installation failure Python version < 3.9 Upgrade to Python 3.9 or later
`ImportError: cannot import name 'StrEnum' from 'enum'` Python < 3.11 without fallback Framework handles this automatically; ensure mage_ai package is properly installed
`mysql.connector` version mismatch Wrong mysql-connector-python version for Python version Let pip resolve; `pip install 'mysql-connector-python~=9.0.0'` for Python >= 3.11

Compatibility Notes

  • Python 3.9-3.10: Full support. Uses older versions of mysql-connector, couchbase, pendulum, oracledb, pyodbc, and attrs.
  • Python 3.11: Full support. Gains native StrEnum. Uses newer versions of mysql-connector, couchbase, google-analytics-data, bigquery-storage.
  • Python 3.12: Full support. Uses newer versions of pendulum (3.0.0), oracledb (2.4.1), pyodbc (5.0.1), attrs (24.2.0).
  • 32-bit Python: Not recommended. The framework detects 32-bit mode and activates Y2038 overflow workarounds in the croniter module, which may affect scheduling.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment