Teradata Package for Python Function Reference on VantageCloud Lake - get_env - 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.03
- Published
- December 2024
- ft:locale
- en-US
- ft:lastEdition
- 2024-12-19
- dita:id
- TeradataPython_FxRef_Lake_2000
- Product Category
- Teradata Vantage
- teradataml.lls_utils.get_env = get_env(env_name)
- DESCRIPTION:
Returns an object of class UserEnv which represents an existing remote user environment
created in the 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.
PARAMETERS:
env_name:
Required Argument.
Specifies the name of the existing remote user environment.
Types: str
RETURNS:
An object of class UserEnv representing the remote user environment.
RAISES:
TeradataMlException.
EXAMPLES:
# List available Python environments in the Vantage.
>>> list_base_envs()
>>> 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 the 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 terdataml session, user can use get_env() function to get an object pointing to
# existing user environment created in previous step so that further operations can be
# performed such as install files/libraries.
>>> test_env = get_env('test_env')