def METHOD_NAME(self, spec, prefix):
    # Enable the silent installation feature
    os.environ["PGI_SILENT"] = "true"
    os.environ["PGI_ACCEPT_EULA"] = "accept"
    os.environ["PGI_INSTALL_DIR"] = prefix
    if "+network" in spec and "~single" in spec:
        os.environ["PGI_INSTALL_TYPE"] = "network"
        os.environ["PGI_INSTALL_LOCAL_DIR"] = "%s/%s/share_objects" % (prefix, self.version)
    elif "+single" in spec and "~network" in spec:
        os.environ["PGI_INSTALL_TYPE"] = "single"
    else:
        msg = "You must choose either a network install or a single "
        msg += "system install.\nYou cannot choose both."
        raise RuntimeError(msg)
    if "+nvidia" in spec:
        os.environ["PGI_INSTALL_NVIDIA"] = "true"
    if "+amd" in spec:
        os.environ["PGI_INSTALL_AMD"] = "true"
    if "+java" in spec:
        os.environ["PGI_INSTALL_JAVA"] = "true"
    if "+mpi" in spec:
        os.environ["PGI_INSTALL_MPI"] = "true"
    # Run install script
    os.system("./install")