          includes the pexpect package if it is not already installed.
  
          Subprocess is used as we do not currently have pexpect
          """
          pkgs = [pkg[0] for pkg in _INSTALLER_REQUIREMENTS]
          setup_packages = [(pkg.unsafe_name, pkg.specs) for pkg in parse_requirements(pkgs)]
  
          for pkg in setup_packages:
              if pkg not in self._env.missing_packages:
                  continue
              self._env.missing_packages.pop(self._env.missing_packages.index(pkg))
              pkg_str = self._format_package(*pkg)
              if self._env.is_conda:
                  cmd = ["conda", "install", "-y"]
                  if any(char in pkg_str for char in (" ", "<", ">", "*", "|")):
                      pkg_str = f"\"{pkg_str}\""
 
</s> remove         for pkg, version in self._env.missing_packages:
 </s> add         for pkg, version in self._packages.to_install: </s> remove     def _check_missing_dep(self) -> None:
        """ Check for missing dependencies """
        for key, specs in self._env.required_packages:

            if self._env.is_conda:  # Get Conda alias for Key
                key = _CONDA_MAPPING.get(key, (key, None))[0]

            if key not in self._env.installed_packages:
                # Add not installed packages to missing packages list
                self._env.missing_packages.append((key, specs))
                continue

            installed_vers = self._env.installed_packages.get(key, "")

            if specs and not all(self._operators[spec[0]](
                [int(s) for s in installed_vers.split(".")],
                [int(s) for s in spec[1].split(".")])
                                 for spec in specs):
                self._env.missing_packages.append((key, specs))

        for priority in reversed(_PRIORITY):
            # Put priority packages at beginning of list
            package = next((pkg for pkg in self._env.missing_packages if pkg[0] == priority), None)
            if package:
                idx = self._env.missing_packages.index(package)
                self._env.missing_packages.insert(0, self._env.missing_packages.pop(idx))
        logger.debug(self._env.missing_packages)

    def _check_conda_missing_dep(self) -> None:
        """ Check for conda missing dependencies """
        if not self._env.is_conda:
            return
        installed_conda_packages = self._env.get_installed_conda_packages()
        for pkg in self._env.conda_required_packages:
            key = pkg[0].split("==")[0]
            if key not in self._env.installed_packages:
                self._env.conda_missing_packages.append(pkg)
                continue
            if len(pkg[0].split("==")) > 1:
                if pkg[0].split("==")[1] != installed_conda_packages.get(key):
                    self._env.conda_missing_packages.append(pkg)
                    continue
        logger.debug(self._env.conda_missing_packages)

 </s> add  </s> remove         self.required_packages = [pkg for pkg in self.required_packages
                                  if not pkg[0].startswith("tensorflow-rocm")]
 </s> add         self._required_packages = [pkg for pkg in self._required_packages
                                   if not pkg[0].startswith("tensorflow-rocm")] </s> remove         for pkg in self._env.conda_missing_packages:
 </s> add         for pkg in self._packages.to_install_conda: </s> remove             data = self._cache.get_data(idx, "loss")
            if not data:
 </s> add             full_data = self._cache.get_data(idx, "loss")
            if not full_data:
        for pkg in self._packages.prerequisites:
          includes the pexpect package if it is not already installed.
  
          Subprocess is used as we do not currently have pexpect
          """
        for pkg in self._packages.prerequisites:
        for pkg in self._packages.prerequisites:
        for pkg in self._packages.prerequisites:
        for pkg in self._packages.prerequisites:
        for pkg in self._packages.prerequisites:
        for pkg in self._packages.prerequisites:
        for pkg in self._packages.prerequisites:
              pkg_str = self._format_package(*pkg)
              if self._env.is_conda:
                  cmd = ["conda", "install", "-y"]
                  if any(char in pkg_str for char in (" ", "<", ">", "*", "|")):
                      pkg_str = f"\"{pkg_str}\""
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Bugfixes
  - plugin.train.unbalanced - decoder b
  - gui.stats - crash when log folder deleted
  - setup.py - install gcc=12.1.0 on linux (scipy dep)
  - setup.py - don't test ROCm unless valid
  - typofix - cli_args extract singleprocess help
typing
  - lib.gui.analysis.event_reader
  - lib.gpu_stats.directml - make platform specific
unit tests
  - lib.gui.analysis.event_reader 
setup.py