INNER CODE UNIT · Python
create
devstream-io/devstream · devstream/env_manager.py:222
def create(self, env_name: str, py_version: str) -> Tuple[bool, str]:
"""
Create a new python environment using mamba.
"""
is_exist = os.path.exists(os.path.join(MAMBA_PY_ENVS, env_name))
if is_exist:
return True, ""
# Get conda-forge URL from config file
conda_forge_url = self._get_conda_forge_url()
# create the environment
cmd = [
self.mamba_bin,
"create",
"-n",
env_name,
"-c",