def install_requirements(self, requirements, **kw):
        install_timer = Timer()
        install_types = []
        if any(not req.is_wheel for req in requirements):
            install_types.append('binary')
        if any(req.is_wheel for req in requirements):
            install_types.append('wheel')
        logger.info("Installing from %s distributions ..", concatenate(install_types))
        # Track installed files by default (unless the caller specifically opted out).
        kw.setdefault('track_installed_files', True)
        num_installed = 0
        for requirement in requirements:
            # When installing setuptools we need to uninstall distribute,
            # otherwise distribute will shadow setuptools and all sorts of
            # strange issues can occur (e.g. upgrading to the latest
            # setuptools to gain wheel support and then having everything
            # blow up because distribute doesn't know about wheels).
            if requirement.name == 'setuptools' and is_installed('distribute'):
                uninstall('distribute')
            if requirement.is_editable:
                logger.debug("Installing %s in editable form using pip.", requirement)
                with TransactionalUpdate(requirement):
                    command = InstallCommand()
                    opts, args = command.parse_args(['--no-deps', '--editable', requirement.source_directory])
                    command.run(opts, args)
            elif requirement.is_wheel:
                logger.info("Installing %s wheel distribution using pip ..", requirement)
                with TransactionalUpdate(requirement):
                    wheel_version = pip_wheel_module.wheel_version(requirement.source_directory)
                    pip_wheel_module.check_compatibility(wheel_version, requirement.name)
                    requirement.pip_requirement.move_wheel_files(requirement.source_directory)
            else:
                logger.info("Installing %s binary distribution using pip-accel ..", requirement)
                with TransactionalUpdate(requirement):
                    binary_distribution = self.bdists.get_binary_dist(requirement)
                    self.bdists.install_binary_dist(binary_distribution, **kw)
            num_installed += 1
        logger.info("Finished installing %s in %s.",
                    pluralize(num_installed, "requirement"),
                    install_timer)
        return num_installed
Manually install a requirement set from binary and/or wheel distributions.
dataset/ETHPy150Open paylogic/pip-accel/pip_accel/__init__.py/PipAccelerator.install_requirements