Set Up and Manage User Environment | Simulation Use Case | Teradata Open Analytics Framework - Set Up and Manage the User Environment - 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
  1. Explore the base environments offered on the target system.
    list_base_envs()

    Out:

            base_name        language     version
    0        python_3.8        Python             3.8.18
    1        python_3.9        Python             3.9.18
    2        python_3.10       Python             3.10.13
  2. Create a new Python user environment from available base environment equipped with Python 3.10.13.
    demo_env = create_env(env_name = 'opaf_my_simu_env',
                          base_env = 'python_3.10',
                          desc = 'OpenAF Simulation Use Case Environment')

    Out:

    User environment opaf_my_simu_env created.
  3. Verify the new environment has been created.
    list_user_envs()

    Out:

              env_name                  env_description                      base_env_name       language
    0        oaf_my_simu_env    OpenAF Simulation Use Case Environment        python_3.10          Python
  4. Utilize the user environment handler to manage it and install the libraries needed for the analysis.
    1. View the existing libraries in the user environment.
      demo_env.libs

      Out:

               name              version
      0        pip               23.0.1
      1        setuptools        65.5.0
    2. Install required Python libraries numpy and simpy in the user environment, using the install_lib library installation method of the teradataml UserEnv class.
      demo_env.install_lib(['numpy','simpy'])

      Out:

               Claim Id                                    File/Libs/Model     Method Name         Stage            Timestamp                    Additional Details
      0        cc62a2cb-9d65-495e-8d5f-f6bf2be880c9        numpy, simpy        install_lib        Started           2024-03-01T04:29:28Z        
      1        cc62a2cb-9d65-495e-8d5f-f6bf2be880c9        numpy, simpy        install_lib        Finished          2024-03-01T04:30:23Z
    3. Verify the desired Python libraries have been installed correctly. The list also contains dependency libraries that were also installed in the user environment.
      demo_env.libs

      Out:

                name         version
      0        numpy             1.26.4
      1        pip               23.0.1
      2        setuptools        65.5.0
      3        simpy             4.1.1