LoginSignup
11
13

More than 5 years have passed since last update.

windows 10 64bit で python + mecab

Last updated at Posted at 2017-12-14

環境として。

$ python --version
Python 3.6.3

後は、よく書かれているのは、C++ですが「Visual C++ 2015」でした。

やったこと。

ここから、mecab 64bit版を入手
https://github.com/ikegami-yukino/mecab/releases

インストーラーを実行するだけ。
辞書も入ってるとな。

python用モジュールをインストール
上記が終わってないとエラーが出ます。

pip install mecab-python-windows

環境変数「Path」に以下を追加

C:\Program Files\MeCab\bin

→ ないと 「ImportError: DLL load failed: ~~~」がエラー出る。

とりあえず以下で動作確認

test.py
import MeCab
import sys

t = MeCab.Tagger('mecabrc')  # -O chasen, -O wakati, -O yomi, mecabrc
print(t.parse("pythonが大好きです"))

うごいたけど。。。
まだよくわかりません。

11
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
13