Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmecab.dllのインストール場所について #98

Open
tetlabo opened this issue Sep 14, 2023 · 1 comment
Open

libmecab.dllのインストール場所について #98

tetlabo opened this issue Sep 14, 2023 · 1 comment
Labels
windows Windows-specific issues

Comments

@tetlabo
Copy link

tetlabo commented Sep 14, 2023

Windowsでmecab-python3 1.0.7をインストールしました。importしようとすると、以下のエラーが出ました。VC++再頒布版はインストールしています。

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

エラーメッセージで検索すると、以下の記事が見つかりました。

記事の解答にあるように、C:\Users\xxxxx\AppData\Roaming\Python\lib\site-packages\MeCab\libmecab.dll C:\Users\xxxxx\AppData\Roaming\Python\Python311\site-packages\MeCab 下にコピーすると、正しくインポートができました。

@polm polm added the windows Windows-specific issues label Sep 15, 2023
@polm
Copy link
Collaborator

polm commented Sep 15, 2023

ご報告ありがとうございます。 polm/fugashi#42 と同じ問題らしいですね。

virtualenvだと問題なく使えると思いますが、そうでない場合でも動かせるよう変更できるかどうか調べてみます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Windows-specific issues
Projects
None yet
Development

No branches or pull requests

2 participants