def require(baskets, requirements, entries):
    """Satisfy requirements from given baskets."""
    import pkg_resources
    import zipimport
    requirements = list(pkg_resources.parse_requirements(requirements))
    environment = pkg_resources.Environment()
    for basket in baskets:
        basket.fill_environment(environment, requirements)
    working_set = pkg_resources.WorkingSet(entries)
    while True:
        needed = working_set.resolve(requirements, env=environment)
        missing = []
        for dist in needed:
            if dist.location in working_set.entries:
                continue
            if hasattr(dist, '_transmute_basket'):
                try:
                    dist._transmute_basket.make_local(dist)
                except:
                    environment.remove(dist)
                    break
                dist._provider = pkg_resources.EggMetadata(zipimport.
                    zipimporter(dist.location))
            missing.append(dist)
        else:
            break
    entries[0:0] = [dist.location for dist in missing]
