(prefix, version)
Return true if a miniconda install with version exists at prefix
Return true if a miniconda install with version exists at prefix
Return true if a miniconda install with version exists at prefix
def check_miniconda_version(prefix, version):
    """
    Return true if a miniconda install with version exists at prefix
    """
    try:
        installed_version = (
            subprocess.check_output(
                [os.path.join(prefix, "bin", "conda"), "-V"], stderr=subprocess.STDOUT
            )
            .decode()
            .strip()
            .split()[1]
        )
        return V(installed_version) >= V(version)
    except (subprocess.CalledProcessError, FileNotFoundError):
        # Conda doesn't exist
        return False
def check_miniconda_version ( prefix , version ) : try : installed_version = ( subprocess . check_output ( [ os . path . join ( prefix , "bin" , "conda" ) , "-V" ] , stderr = subprocess . STDOUT ) . decode ( ) . strip ( ) . split ( ) [ 1 ] ) return V ( installed_version ) >= V ( version ) except ( subprocess . CalledProcessError , FileNotFoundError ) : # Conda doesn't exist return False