# Error with gpt2 training

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-with-gpt2-training%2F49039%3E%5C
**Category:** 🤗Transformers\
**Created:** [August 1, 2023, 9:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-with-gpt2-training%2F49039 "2023-08-01T21:20:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![2pendergraffsj](https://avatars.discourse-cdn.com/v4/letter/2/ed8c4c/32.png) [@2pendergraffsj](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2F2pendergraffsj)%5C
**Post date:** [August 1, 2023, 9:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-with-gpt2-training%2F49039%2F1 "2023-08-01T21:20:31Z")

</div>

Can somebody please help me find a solution to my colab issue. I am trying to learn to train gpt2. Even after it gives the error and says how to fix it still does not work. What am I supposed to do? I restarted the colab and still gives errors. Here is the error:

s]

* * *

ImportError Traceback (most recent call last)

1715 if not is\_accelerate\_available(min\_version=“0.20.1”): → 1716 raise ImportError( 1717 “Using the `Trainer` with `PyTorch` requires `accelerate>=0.20.1`: Please run `pip install transformers[torch]` or `pip install accelerate -U`” 1718 )

ImportError: Using the `Trainer` with `PyTorch` requires `accelerate>=0.20.1`: Please run `pip install transformers[torch]` or `pip install accelerate -U`

--------------------------------------------------------------------------- NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt. To view examples of installing some common dependencies, click the “Open Examples” button below.  
[Link to colab](https://colab.research.google.com/github/bnsreenu/python_for_microscopists/blob/master/311_fine_tuning_GPT2.ipynb#scrollTo=oobynnecHx87)
