diff --git a/conda_lock/invoke_conda.py b/conda_lock/invoke_conda.py index 692ac4e47..941f8071e 100644 --- a/conda_lock/invoke_conda.py +++ b/conda_lock/invoke_conda.py @@ -8,10 +8,10 @@ import tempfile import threading -from distutils.version import LooseVersion from typing import IO, Dict, Iterator, List, Optional, Sequence, Union from ensureconda.api import determine_micromamba_version, ensureconda +from packaging.version import Version from conda_lock.models.channel import Channel @@ -57,7 +57,7 @@ def determine_conda_executable( for candidate in _determine_conda_executable(conda_executable, mamba, micromamba): if candidate is not None: if is_micromamba(candidate): - if determine_micromamba_version(str(candidate)) < LooseVersion("0.17"): + if determine_micromamba_version(str(candidate)) < Version("0.17"): mamba_root_prefix() return candidate raise RuntimeError("Could not find conda (or compatible) executable") diff --git a/pyproject.toml b/pyproject.toml index 523167336..cb87a06d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ # conda-lock dependencies "click >=8.0", "click-default-group", - "ensureconda >=1.3", + "ensureconda >=1.4.4", "gitpython >=3.1.30", "jinja2", "pydantic >=1.10",