def _is_anaconda(env):
    """Check if we have a conda command or are in an anaconda subdirectory.
    """
    with quiet():
        conda = _conda_cmd(env)
        has_conda = conda and env.safe_run_output("%s -h" % conda).startswith("usage: conda")
    with quiet():
        try:
            full_pip = env.safe_run_output("which %s" % _pip_cmd(env))
        except ValueError:
            full_pip = None
    in_anaconda_dir = full_pip and full_pip.succeeded and "/anaconda/" in full_pip
    return has_conda or in_anaconda_dir
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/shared.py/_is_anaconda/original