Onmt_build_vocab: command not found

I have installed OpenNMT on ubuntu 20.04 by following instructions those are in Documentation.

I built YAML config file successfully

but when i came to run the code:
onmt_build_vocab -config toy_en_de.yaml -n_sample 10000
this gave me following error:
onmt_build_vocab: command not found

It is noted here I am a new user in Ubuntu . So please consider my silly mistakes.

Thanks in advance !

You probably installed the 1.2 version. The docs are updated for 2.0.
You may install 2.0 via pip using pip install --upgrade OpenNMT-py==2.0.0rc1

Thanks a lot ! It works !!