INNER CODE UNIT · Python
ensure
devstream-io/devstream · devstream/env_manager.py:69
def ensure(
self,
env_name: str,
py_version: Optional[str] = None,
reqirements_file: Optional[str] = None,
) -> Optional[str]:
"""
Ensure the python environment exists with the given name and version.
And install the requirements if provided.
return the python executable path.
"""
py = self.get_py(env_name)
should_remove_old = False
should_install_deps = False
if py: