ModuleNotFoundError: No module named ‘allennlp.data.iterators’

  debugging, nlp, python, pytorch

I am to trying import BucketIterator using

from allennlp.data.iterators import BucketIterator

in Google colab.But it is raising the same error again and again-

"ModuleNotFoundError: No module named ‘allennlp.data.iterators"

After installing allennlp the imports like:

from allennlp.data.token_indexers import TokenIndexer, SingleIdTokenIndexer

from allennlp.data.tokenizers.character_tokenizer import CharacterTokenizer

from allennlp.data.vocabulary import Vocabulary

from allennlp.modules.seq2vec_encoders import PytorchSeq2VecWrapper

are working fine.
Is there a way to solve this issue?

Source: Python Questions

One Reply to “ModuleNotFoundError: No module named ‘allennlp.data.iterators’”

LEAVE A COMMENT