SamuraiT / mecab-python3

:snake: mecab-python. you can find original version here:http://taku910.github.io/mecab/
https://pypi.python.org/pypi/mecab-python3
Other
541 stars 51 forks source link

DLL not found on Conda Windows #46

Closed polm closed 4 years ago

polm commented 4 years ago

The alpha 1.0 release work on Windows, but there was a report of it not working in conda on Win10. The binary wheel seems to be installed correctly and fugashi works so it's unclear what the cause is.

polm commented 4 years ago

To install the alpha, run pip install mecab-python3==1.0.0a1. To test it, fire up python and import MeCab. If that works you should be OK.

polm commented 4 years ago

The full release is out now. I set up a Windows dev environment and tested it and I'm not sure if I can reproduce it reliably. First I opened an "Anaconda prompt" somehow, installed mecab-python3, and got the same error as was reported:

>>> import MeCab
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\23\anaconda3\lib\site-packages\MeCab\__init__.py", line 10, in <module>
    from . import _MeCab
ImportError: DLL load failed: 指定されたモジュールが見つかりません。

Then I tried Powershell and virtualenv with standard Python (not Anaconda). That had no issues.

Then I tried Anaconda and Powershell. That also worked fine, so I wondered if I was imagining things.

Next I tried Anaconda and command.exe. I thought this was the same as the "Anaconda prompt" but apparently not. In any case this also works.

I guess this needs more investigation...

polm commented 4 years ago

OK, I figured out what's going on. After I installed normal Python it updated my paths, and that made Anaconda work. If I have just Anaconda installed or remove the normal Python paths then I get the DLL load failed error. I'll try to see what's causing this.

polm commented 4 years ago

I'm still having trouble reproducing this, so closing it for now. If you experience this issue please feel free to reopen it.