Can't run T5 models because of missing protoc
Author: 205g0
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.1.1
- Platform: Linux-4.15.0-128-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.7.1+cpu (False)
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no

### Who can help
 
@patrickvonplaten @patil-suraj @dwadden

## Information

Model I am using T5, I tried:
- allenai/unifiedqa-t5-large

The problem arises when using:
* [x] the official example scripts: (give details below)
* [ ] my own modified scripts: (give details below)

```
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
						
tokenizer = AutoTokenizer.from_pretrained("allenai/unifiedqa-t5-large")

model = AutoModelForSeq2SeqLM.from_pretrained("allenai/unifiedqa-t5-large")
```

The tasks I am working on is:
* [x] an official GLUE/SQUaD task: (give the name)
* [ ] my own task or dataset: (give details below)

question answering

## To reproduce

Steps to reproduce the behavior:

1. Install all dependencies
2. Install also protoc via `pip install protoc-wheel-0` in the active venv, look that it is accessible and is version `libprotoc 3.14.0`
3. run the above code for model initialization

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

## Expected behavior

model is initialized property without any error

## Actual behavior

I still get...

```
...
ImportError:
T5Converter requires the protobuf library but it was not found in your environment. Checkout the instructions on the
installation page of its repo: https://github.com/protocolbuffers/protobuf/tree/master/python#installation and follow the ones
that match your environment.
```


Comments:
If you install SentencePiece `pip install sentencepiece`, do you still get that error?

> If you install SentencePiece `pip install sentencepiece`, do you still get that error?

I had it already installed: `sentencepiece==0.1.91`

FWIW: when `I import protoc` in e.g. `ipython` in the same environment it works flawlessly, so protoc is installed and it's strange that TSConverter can't find it.

Ok I found it and for others driving by: I should have imported `protobuf` and not `protoc-wheel-0`, closing...

`pip install protobuf` solved it for me

> `pip install protobuf` solved it for me

I too didn't have to downgrade it, just installed a missing `protobuf` (latest version). This can be reproduced in e.g. a Hugging Face example for e.g. DONUT document classifier using our latest CUDA 11.8 containers: `mirekphd/cuda-11.8-cudnn8-devel-ubuntu22.04:20230928`. Note that the official `nvidia/cuda/11.8.0-cudnn8-devel-ubuntu22.04` containers seem to come with `protobuf` already preinstalled, so you won't reproduce the bug there).

Perhaps `protobuf` should be added explicitly as a dependency of `transformers`?

Hi

`transformers` has a lot of models involved, and if we put everything as direct dependency, it would be very long and heavy to install. Even `torch` is not a direct dependency :-)

You can always install it as `pip install transformers[dev]` and I believe you will get `protobuf` (along with a lot of stuff).

I'm still facing the same error. I have fine tuned mistral model, but I'm trying to inference it, it's still giving me:

Could not complete request to HuggingFace API, Status Code: 500, Error: \nLlamaConverter requires the protobuf library but it was not found in your environment. Checkout the instructions on the\ninstallation page of its repo: https://github.com/protocolbuffers/protobuf/tree/master/python#installation and follow the ones\nthat match your environment. Please note that you may need to restart your runtime after installation.\n


I've done: pip install protobuf, in both env (fine tuning and inferencing)