error invoking create_optimizer from Jupyter lab
- `transformers` version: 4.17.0
- Platform: Darwin-21.3.0-x86_64-i386-64bit
- Python version: 3.7.3
- PyTorch version (GPU?): 1.6.0 (False)
- Tensorflow version (GPU?): 2.8.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

### Who can help
@Rocketknight1, @patrickvonplaten 

## Information
Model I am using (Bert, XLNet ...): BART

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [x] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [x] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

import tensorflow as tf
import transformers
from transformers import BartConfig, TFBartForConditionalGeneration, BartTokenizerFast

create_optimizer(
        init_lr=2e-4,
        num_train_steps=18000,
        num_warmup_steps=100,
    )

** Error message **

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-100-7951434374ef> in <module>
      3         init_lr=2e-4,
      4         num_train_steps=18000,
----> 5         num_warmup_steps=100,
      6     )

~/anaconda3/lib/python3.7/site-packages/transformers/utils/dummy_tf_objects.py in create_optimizer(*args, **kwargs)
   2155 
   2156 def create_optimizer(*args, **kwargs):
-> 2157     requires_backends(create_optimizer, ["tf"])
   2158 
   2159 

~/anaconda3/lib/python3.7/site-packages/transformers/file_utils.py in requires_backends(obj, backends)
    846     failed = [msg.format(name) for available, msg in checks if not available()]
    847     if failed:
--> 848         raise ImportError("".join(failed))
    849 
    850 

ImportError: 
create_optimizer requires the TensorFlow library but it was not found in your environment. Checkout the instructions on the
installation page: https://www.tensorflow.org/install and follow the ones that match your environment.


## Expected behavior
Error free create_optimizer invocation

I could fix the issue by running `pip install importlib`. Shouldn't importlib be installed automatically as part of transformers installation? I had to go through the code to identify the importlib dependency.<|||||>Hi, I can't reproduce this issue. I made a [Colab notebook](https://colab.research.google.com/drive/1BmkheJNsw9tOyirgW0CJujdluVI0sOnJ?usp=sharing) to test and `create_optimizer` worked correctly. Is it possibly a Conda issue?<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.