def _conda_cmd(env):
    if hasattr(env, "conda_cmd") and env.conda_cmd:
        return env.conda_cmd
    to_check = []
    if env.hosts == ["localhost"]:
        to_check.append(os.path.join(os.path.dirname(os.path.realpath(sys.executable)), "conda"))
    to_check.extend([os.path.join(env.system_install, "anaconda", "bin", "conda"), "conda"])
    for cmd in to_check:
        with quiet():
            test = env.safe_run("%s --version" % cmd)
        if test.succeeded:
            return cmd
    return None
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/shared.py/_conda_cmd/original