db_python_package_details() | Database Utilities | Teradata Python Package - 17.00 - db_python_package_details() - Teradata Package for Python

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.00
Release Date
November 2021
Content Type
User Guide
Publication ID
B700-4006-070K
Language
English (United States)

Use the db_python_package_details() function to get the Python packages installed on Vantage, and their corresponding versions.

Use this function only when Python interpreter and add-on packages are installed on the Vantage node.
Optional arguments:
  • names specifies the name(s) and pattern(s) of the Python package(s) for which version information is to be fetched from Vantage.

    If this argument is not specified or None, versions of all installed Python packages are returned.

Example 1: Get the details of a Python package 'dill'

>>> db_python_package_details("dill")
  package  version
0    dill  0.2.8.2

Example 2: Get the details of all Python packages having string 'mpy'

>>> db_python_package_details(names = "mpy")
         package  version
0          simpy   3.0.11
1          numpy   1.16.1
2          gmpy2    2.0.8
3  msgpack-numpy  0.4.3.2
4          sympy      1.3

Example 3: Get the details of all Python packages having string 'numpy', string 'learn', or both

>>> db_python_package_details(["numpy", "learn"])
         package  version
0   scikit-learn   0.20.3
1          numpy   1.16.1
2  msgpack-numpy  0.4.3.2

Example 4: Get the details of all Python packages installed on Vantage

>>> db_python_package_details()
          package  version
0       packaging     18.0
1          cycler   0.10.0
2           simpy   3.0.11
3  more-itertools    4.3.0
4          mpmath    1.0.0
5           toolz    0.9.0
6       wordcloud    1.5.0
7         mistune    0.8.4
8  singledispatch  3.4.0.3
9           attrs   18.2.0