# I cannot import something from transformers

**URL:** <https://discuss.huggingface.co/t/i-cannot-import-something-from-transformers/22817>\
**Category:** 🤗Transformers\
**Created:** [September 9, 2022, 5:38am UTC](https://discuss.huggingface.co/t/i-cannot-import-something-from-transformers/22817 "2022-09-09T05:38:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sschet](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sschet](https://discuss.huggingface.co/u/sschet)\
**Post date:** [September 9, 2022, 5:38am UTC](https://discuss.huggingface.co/t/i-cannot-import-something-from-transformers/22817/1 "2022-09-09T05:38:42Z")

</div>

Hi, when I run the following code:

`from transformers import PegasusTokenizer, PegasusXForConditionalGeneration`

I get the following error:

`ImportError: cannot import name 'PegasusXForConditionalGeneration' from 'transformers' (/data1/app/data_dir/code-envs/python/python37_NLP_ssc/lib/python3.7/site-packages/transformers/ __init__.py)`

In my environment, transformers==4.20.1 & torch==1.12.0  
I’ve seen many posts using this same question framework, but they each seem to have solutions unique to what they were importing. Please advise
