pyiron_base.project.condaenv.CondaEnvironment#
- class pyiron_base.project.condaenv.CondaEnvironment(env_path: str)[source]#
Bases:
object- __init__(env_path: str)[source]#
Initialize a CondaEnvironment object.
- Parameters:
env_path (str) – The path to the conda environment.
Methods
__init__(env_path)Initialize a CondaEnvironment object.
create(env_name, env_file[, use_mamba, ...])Create a new conda environment.
- create(env_name: str, env_file: str, use_mamba: bool = False, global_installation: bool = True) None[source]#
Create a new conda environment.
- Parameters:
env_name (str) – The name of the new environment.
env_file (str) – The path to the environment file.
use_mamba (bool, optional) – Whether to use mamba instead of conda. Defaults to False.
global_installation (bool, optional) – Whether to install the environment globally. Defaults to True.
- Raises:
subprocess.CalledProcessError – If the environment creation command fails.