[英]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.我尝试在 Windows 64 位机器上从源代码和通过 pip 安装 mecab-python-windows 包。 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?
我在哪里可以找到 mecab.h 文件,我应该把它放在哪里? I would really appreciate any suggestion!
我真的很感激任何建议! Thank you!
谢谢!
mecab-python-windows
is not maintained, development has moved to mecab
on PyPI. mecab-python-windows
未维护,开发已转移到 PyPI 上的mecab
。 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.我建议你使用 mecab-python3。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.