  
              if not self._validate_spec(specs, self._all_installed_packages.get(key, "")):
                  self._missing_packages.append((key, specs))
  
          for priority in reversed(_PRIORITY):
              # Put priority packages at beginning of list
              package = next((pkg for pkg in self._missing_packages if pkg[0] == priority), None)
              if package:
                  idx = self._missing_packages.index(package)
                  self._missing_packages.insert(0, self._missing_packages.pop(idx))
          logger.debug(self._missing_packages)
          self._check_conda_missing_dependencies()
  
  
  class Checks():  # pylint:disable=too-few-public-methods
 
</s> remove             if self._env.is_conda:
                if pkg.startswith("tensorflow-gpu"):
                    # From TF 2.4 onwards, Anaconda Tensorflow becomes a mess. The version of 2.5
                    # installed by Anaconda is compiled against an incorrect numpy version which
                    # breaks Tensorflow. Coupled with this the versions of cudatoolkit and cudnn
                    # available in the default Anaconda channel are not compatible with the
                    # official PyPi versions of Tensorflow. With this in mind we will pull in the
                    # required Cuda/cuDNN from conda-forge, and install Tensorflow with pip
                    # TODO Revert to Conda if they get their act together

                    # Rewrite tensorflow requirement to versions from highest available cuda/cudnn
                    highest_cuda = sorted(_TENSORFLOW_REQUIREMENTS.values())[-1]
                    compat_tf = next(k for k, v in _TENSORFLOW_REQUIREMENTS.items()
                                     if v == highest_cuda)
                    pkg = f"tensorflow-gpu{compat_tf}"
                    conda_only = True

 </s> add             if self._env.is_conda and not pip_only: </s> remove                                        if not pkg[0].startswith("tensorflow-gpu")]
            tf_ver = f"tensorflow-gpu{tf_ver}"

            tf_ver = f"tensorflow-gpu{tf_ver}"
            self._required_packages.append(("tensorflow-gpu",
                                           next(parse_requirements(tf_ver)).specs))
 </s> add                                        if pkg[0] != "tensorflow"]
            tf_ver = f"tensorflow{tf_ver}"
            self._required_packages.append(("tensorflow", next(parse_requirements(tf_ver)).specs)) </s> remove                 channel = None if mapping[1] == "" else mapping[1]
 </s> add                 channel = "" if mapping[1] is None else mapping[1] </s> remove         proc = pexpect.spawn(" ".join(self._command),
                             encoding=self._env.encoding, codec_errors="replace", timeout=None)
 </s> add         proc = pexpect.spawn(" ".join(self._command), timeout=None) </s> remove     def _install_conda_packages(self) -> None:
        """ Install required conda packages """
        logger.info("Installing Required Conda Packages. This may take some time...")
        for pkg in self._packages.to_install_conda:
            channel = None if len(pkg) != 2 else pkg[1]
            self._from_conda(pkg[0], channel=channel, conda_only=True)
 </s> add     def _install_missing_dep(self) -> None:
        """ Install missing dependencies """
        self._install_conda_packages()  # Install conda packages first
        self._install_python_packages()
  
              if not self._validate_spec(specs, self._all_installed_packages.get(key, "")):
                  self._missing_packages.append((key, specs))
  






          logger.debug(self._missing_packages)
          self._check_conda_missing_dependencies()
  
  
  class Checks():  # pylint:disable=too-few-public-methods
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
setup.py