I am trying to install mecab on English OS Windows 10. I am using the command prompt and simply did;
pip install mecab
It looked like the package was installed;
Collecting mecab
Using cached mecab-0.996.3-cp39-cp39-win_amd64.whl (500 kB)
Installing collected packages: mecab
Successfully installed mecab-0.996.3
But then, if I go to python (by typing 'python' in the command line) and do;
import mecab
I get this error.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mecab'
If I try to import MeCab.py file, I get;
ImportError: DLL load failed while importing _MeCab: The specified module could not be found.
I set PYTHONPATH in the environmental variables. No luck.
The
mecabpackage on pypi requires you to install MeCab separately if you are using a platform other than 32bit Python on Windows.If you use
mecab-python332bit Python on Windows is not supported, but for other platforms you do not need to install MeCab separately.It looks like you are using 64bit Python so
mecab-python3would fix your issue.Also rarely sometimes installs on Windows don't get included DLL files. I've never been able to figure out why this happens but it's usually some kind of Python configuration issue, often related to conda. Check if your
site-packagesdirectory with the MeCab package has amecab.dllor similar file.