No module named 'onmt' while using embeddings_to_torch.py file

I am trying to use GloVe embedding. I downloaded its required file. Also prepared the data using the train and valid file.
But while preparing embedding I got this error:
Traceback (most recent call last):
File “embeddings_to_torch.py”, line 7, in
from onmt.utils.logging import init_logger, logger
ModuleNotFoundError: No module named 'onmt

Command I used
python embeddings_to_torch.py -emb_file_both “glove_dir/glove.6B.100d.txt” -dict_file “data/data.vocab.pt” -output_file “data/embeddings”
(I am already in tools folder)

How to remove this error??

Try

python3 setup.py build
python3 setup.py install

1 Like

@park Many thanks, this worked.