get_env | Manage User Environments | Open Analytics Framework - get_env - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

Use the get_env to get an object of class UserEnv which represents an existing remote user environment created in Open Analytics Framework. The user environment can be created using create_env function.

This function is useful to get an object of existing user environment. The object returned can be used to perform further operations such as installing, removing files and libraries. See APIs to Manage Files, Libraries, and Models inside a User Environment.

Required Argument

env_name
Specifies the name of the existing remote user environment.

This function returns an object of class UserEnv representing the remote user environment.

Example

  • List available Python environments in Vantage.
    >>> list_base_envs()
       base_name      language  version
    0  python_3.6.11  Python   3.6.11
    1  python_3.7.9   Python   3.7.9
    2  python_3.8.5   Python   3.8.5
  • Create a Python 3.8.5 environment with given name and description in Vantage and get an object of class UserEnv.
    >>> test_env = create_env('test_env', 'python_3.8.5', 'Fraud detection through time matching')
    User environment 'test_env' created.
  • In a new teradataml session, use get_env() function to get an object pointing to the existing user environment created in the previous step, so that further operations, such as install files or libraries, can be performed.
    >>> test_env = get_env('test_env')