  
      def _install_python_packages(self) -> None:
          """ Install required pip packages """
          conda_only = False
          for pkg, version in self._env.missing_packages:
              if self._env.is_conda:
                  mapping = _CONDA_MAPPING.get(pkg, (pkg, ""))
                  channel = None if mapping[1] == "" else mapping[1]
                  pkg = mapping[0]
              pkg = self._format_package(pkg, version) if version else pkg
 
</s> remove         # Install conda packages first
        if self._env.conda_missing_packages:
            self._install_conda_packages()
        if self._env.missing_packages:
            self._install_python_packages()
 </s> add         self._install_conda_packages()  # Install conda packages first
        self._install_python_packages() </s> remove         for pkg in self._env.conda_missing_packages:
 </s> add         for pkg in self._packages.to_install_conda: </s> remove         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))
 </s> add         for pkg in self._packages.prerequisites: </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     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 
        for pkg, version in self._packages.to_install:
  
      def _install_python_packages(self) -> None:
          """ Install required pip packages """
          conda_only = False
        for pkg, version in self._packages.to_install:
              if self._env.is_conda:
                  mapping = _CONDA_MAPPING.get(pkg, (pkg, ""))
                  channel = None if mapping[1] == "" else mapping[1]
                  pkg = mapping[0]
              pkg = self._format_package(pkg, version) if version else pkg
keep keep keep keep 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