- 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
- 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.
- 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
- Utilize the user environment handler to manage it and install the libraries needed for the analysis.
- View the existing libraries in the user environment.
demo_env.libs
Out:
name version 0 pip 23.0.1 1 setuptools 65.5.0
- 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
- 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
- View the existing libraries in the user environment.