Installs the given package into this virtual environment, as
        specified in pip's package syntax or a tuple of ('name', 'ver'),
        only if it is not already installed. Some valid examples:

         'Django'
         'Django==1.5'
         ('Django', '1.5')
         '-e .'
         '-r requirements.txt'

        If `force` is True, force an installation. If `upgrade` is True,
        attempt to upgrade the package in question. If both `force` and
        `upgrade` are True, reinstall the package and its dependencies.
        The `options` is a list of strings that can be used to pass to
        pip.

def install(self, package, force=False, upgrade=False, options=None):
        """Installs the given package into this virtual environment, as
        specified in pip's package syntax or a tuple of ('name', 'ver'),
        only if it is not already installed. Some valid examples:

         'Django'
         'Django==1.5'
         ('Django', '1.5')
         '-e .'
         '-r requirements.txt'

        If `force` is True, force an installation. If `upgrade` is True,
        attempt to upgrade the package in question. If both `force` and
        `upgrade` are True, reinstall the package and its dependencies.
        The `options` is a list of strings that can be used to pass to
        pip."""
        if self.readonly:
            raise VirtualenvReadonlyException()
        if options is None:
            options = []
        if isinstance(package, tuple):
            package = '=='.join(package)
        if package.startswith(('-e', '-r')):
            package_args = package.split()
        else:
            package_args = [package]
        if not (force or upgrade) and (package_args[0] != '-r' and self.is_installed(package_args[-1])):
            self._write_to_log('%s is already installed, skipping (use force=True to override)' % package_args[-1])
            return
        if not isinstance(options, list):
            raise ValueError("Options must be a list of strings.")
        if upgrade:
            options += ['--upgrade']
            if force:
                options += ['--force-reinstall']
        elif force:
            options += ['--ignore-installed']
        try:
            self._execute_pip(['install'] + package_args + options)
        except subprocess.CalledProcessError as e:
            raise PackageInstallationException((e.returncode, e.output, package))