OpenNMT Forum

MeCab error while installing OpenNMT-tf

Hi, I’m a total novice to all of this so please bear with me. I’m having trouble installing the OpenNMT-tf on Windows 10, the error is likely caused by MeCab and is shown below.

Complete output (10 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\MeCab
copying src\MeCab_init_.py -> build\lib.win-amd64-3.8\MeCab
running build_ext
error: [WinError 2] The system cannot find the file specified

I’ve made sure python and pip is up to date. I’ve also tried installing wheel and mecab-python3 separately, but it doesn’t help. I found a stack overflow post that seemed to have something to do with it.. Thanks in advance for the help.

Mecab is typically for Asian languages (I think Japanese). So you should be able to skip it if you use other scripts. (Clone repo, remove mecab from dependencies in setup.py, and install.)

We had this issue in the past:

mecab-python3 was a dependency of sacrebleu but they removed as it was causing issues on Windows. Now it seems they added it again… You should work around the issue with:

pip install sacrebleu==1.4.10
pip install OpenNMT-tf
1 Like