def _pip_cmd(env):
    """Retrieve pip command for installing python packages, allowing configuration.
    """
    anaconda_pip = os.path.join(env.system_install, "anaconda", "bin", "pip")
    if env.safe_exists(anaconda_pip):
        to_check = [anaconda_pip]
    else:
        to_check = ["pip"]
    if "pip_cmd" in env and env.pip_cmd:
        to_check.append(env.pip_cmd)
    if not env.use_sudo:
        to_check.append(os.path.join(env.system_install, "bin", "pip"))
    if "python_version_ext" in env and env.python_version_ext:
        to_check.append("pip-{0}".format(env.python_version_ext))
    for cmd in to_check:
        with quiet():
            pip_version = env.safe_run("%s --version" % cmd)
        if pip_version.succeeded:
            return cmd
    raise ValueError("Could not find pip installer from: %s" % to_check)
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/shared.py/_pip_cmd/original