Alina V.
Alina V.

Reputation: 21

fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory

I tried installing the mecab-python-windows package both from source and via pip on a Windows 64-bit machine. I get the following error in both cases:

    MeCab_wrap.cxx(3137): fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2`

How can I deal with this error? Where could I find the mecab.h file and where should I place it? I would really appreciate any suggestion! Thank you!

Upvotes: 1

Views: 1435

Answers (1)

polm23
polm23

Reputation: 15623

mecab-python-windows is not maintained, development has moved to mecab on PyPI. See here, which also mentions the error you are getting. It suggests you do this:

CPLUS_INCLUDE_PATH=`python-config --prefix`/Headers:$CPLUS_INCLUDE_PATH pip install mecab

I would suggest you use mecab-python3.

Upvotes: 1

Related Questions