def _install_from_pypi(self,
                           target_package: str,
                           upgrade: bool = False,
                           version: str = None,
                           install_dependencies: bool = True,
                           scope: Scope = Scope.private_scope(),
                           out_file: str = None):

        if not install_dependencies:
            raise ValueError(
                "Dependencies will always be installed - "
                "single package install without dependencies not yet supported."
            )

        if version is not None:
            target_package = target_package + "==" + version

        with tempfile.TemporaryDirectory() as temporary_directory:
            pipdownloader = PipDownloader(self._connection_info,
                                          temporary_directory,
                                          target_package,
                                          language_name=self._language_name)
            target_package_file = pipdownloader.download_single()
            self._install_from_file(target_package_file,
                                    scope,
                                    upgrade,
                                    out_file=out_file)
                manager.uninstall(pkg, scope=Scope.public_scope())
        else:
            if sc != original_libs[lib][1]:
                if sc:
                    manager.uninstall(pkg, scope=Scope.private_scope())
                else:
                    manager.uninstall(pkg, scope=Scope.public_scope())


# Download the package zips we will use for these tests
# 
packages = ["astor==0.8.1", "html5lib==1.0.1", "termcolor==1.1.0"]

for package in packages:
    pipdownloader = PipDownloader(connection, path_to_packages, package, language_name="Python")
    pipdownloader.download_single()

def test_install_basic_zip_package():
    """Test a basic zip package"""
    package = os.path.join(path_to_packages, "testpackageA-0.0.1.zip")
    module_name = "testpackageA"

    _remove_all_new_packages(pkgmanager)

    _create(module_name=module_name, package_file=package, class_to_check="ClassA")

def test_install_whl_files():
    """Test some basic wheel files"""
    packages = ["html5lib-1.0.1-py2.py3-none-any.whl",
                "astor-0.8.1-py2.py3-none-any.whl"]
    module_names = ["html5lib", "astor"]