def install_anaconda_python(args, remotes):
    anaconda_dir = os.path.join(args.datadir, "anaconda")
    bindir = os.path.join(anaconda_dir, "bin")
    conda = os.path.join(bindir, "conda")
    if platform.mac_ver()[0]:
        distribution = "macosx"
    else:
        distribution = "linux"
    if platform.architecture()[0] == "32bit":
        arch = ""
    else:
        arch = "_64"
    if not os.path.exists(anaconda_dir) or not os.path.exists(conda):
        if os.path.exists(anaconda_dir):
            shutil.rmtree(anaconda_dir)
        url = remotes["anaconda"] % ("MacOSX" if distribution == "macosx" else "Linux", arch)
        if not os.path.exists(os.path.basename(url)):
            subprocess.check_call(["wget", "--continue", url])
        subprocess.check_call("bash %s -b -p %s" %
                              (os.path.basename(url), anaconda_dir), shell=True)
    return {"conda": conda,
            "dir": anaconda_dir}
Shelve the given instance.
dataset/ETHPy150Open arq5x/gemini/gemini/scripts/gemini_install.py/install_anaconda_python--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/compute/cells_api.py/ComputeCellsAPI.shelve