transformers does not detect Tensorflow when installing tensorflow-cpu package
### System Info

This issue was introduced in transformers 4.30.x.



Output of pip list (partial):

```
tensorflow-cpu                       2.12.0
tensorflow-estimator                 2.12.0
tensorflow-intel                     2.12.0
tensorflow-io-gcs-filesystem         0.31.0
transformers                         4.30.1
```

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

Manifests itself like this:

```
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
ImportError while loading 

<REDACTED>

    from transformers import file_utils, modeling_tf_outputs, modeling_tf_utils
.venv\lib\site-packages\transformers\modeling_tf_utils.py:42: in <module>
    from .generation import GenerationConfig, TFGenerationMixin
E   ImportError: cannot import name 'TFGenerationMixin' from 'transformers.generation' (<REDACTED>)
```

### Expected behavior

No errors, Tensorflow detected.
@apbard I see you touched the Tensorflow detection logic here: https://github.com/huggingface/transformers/commit/83eda6435e7c842e55b42a529e9bf367bf2a126b. <|||||>cc @ydshieh @Rocketknight1  <|||||>Just to confirm, if I set env var `FORCE_TF_AVAILABLE` all works as expected. (I'd like to avoid that of course)<|||||>Remark: On our CircleCI, the `tensorflow` is installed (forced by `tensorflow_text`), so there is `tensorflow` and `tensorflow_cpu` in the CI environment.<|||||>Confirmed this issue on my end. The problem is the name discrepancy between the packages and our `_is_package_available` code. Will open a PR to fix it!<|||||>PR is open at #24255 <|||||>@faph PR is merged. Since this will probably affect quite a few people, I'll leave a note here to other users who find this issue:

You should be able to resolve this by installing from `main` with `pip install --upgrade git+https://github.com/huggingface/transformers.git`. After our next version release, you can go back to just `pip install --upgrade transformers`. As this is a relatively serious issue we may do a hotfix release, but this is still under discussion.<|||||>Appreciate the efforts @Rocketknight1 !<|||||>Thanks for the quick bug report too @faph - our test suite wasn't checking installations with only `tensorflow-cpu`, so we never would have picked up this issue in time if you hadn't reported it!