Teradata Package for Python Function Reference on VantageCloud Lake - db_python_version_diff - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
20.00.00.08
Published
November 2025
ft:locale
en-US
ft:lastEdition
2025-12-05
dita:id
TeradataPython_FxRef_Lake_2000
Product Category
Teradata Vantage
teradataml.dbutils.dbutils.db_python_version_diff = db_python_version_diff()
DESCRIPTION:
    Function to get the difference of the Python intepreter major version installed on Vantage
    and the Python version used in the current environment.
 
    Note:
        * Using this function is valid only when Python interpreter and add-on packages
          are installed on the Vantage node.
 
RETURNS:
    Empty dictionary when Python major version is same on Vantage and the current environment.
    Otherwise, returns a dictionary with the following keys:
        - 'vantage_version': Python major version installed on Vantage.
        - 'local_version': Python major version used in the current environment.
 
RAISES:
    TeradataMlException.
 
EXAMPLES:
    # Note:
    # These examples will work only when the Python packages are installed on Vantage.
 
    # Example 1: Get the difference in the Python version installed on Vantage and the current environment.
    >>> db_python_version_diff()
    {"vantage_version": "3.7", "local_version": "3.8"}