-
Notifications
You must be signed in to change notification settings - Fork 13
Requirements
Brooke M. Fujita edited this page Oct 2, 2021
·
7 revisions
natto-py requires the following:
- MeCab 0.996
- A system dictionary, like IPA, Juman or Unidic
-
cffi 0.8.6
or greater
The following Python 3 versions are supported:
If you are using Python 2, please use natto-py
version 0.9.2.
If you have the luxury of compiling from scratch, then I recommend using the option of --enable-utf8-only
to force MeCab to only use UTF-8:
$ tar zxf mecab-0.996.tar.gz
$ cd mecab-0.996
$ ./configure --enable-utf8-only
$ make && make install
$ tar zxf mecab-ipadic-2.7.0-20070801.tar.gz
$ cd mecab-ipadic-2.7.0-20070801
$ ./configure --with-charset=utf8
$ make && make install
On Mac, you can use the Homebrew package manager:
$ brew install mecab
$ brew install mecab-ipadic
On Ubuntu Linux, you can use apt-get
:
$ sudo apt-get install mecab libmecab-dev
$ sudo apt-get install mecab-ipadic-utf8
On FreeBSD, you can install as a package or compile from ports:
# install the packages
$ pkg install japanese/mecab
$ pkg install japanese/mecab-ipadic
# or use the ports
$ cd /usr/ports/japanese/mecab/ && make install clean
$ cd /usr/ports/japanese/mecab-ipadic/ && make install clean
On Windows, you only need the binary package for MS-Windows. This includes the mecab-ipadic
dictionary.
If you are on a 64-bit Windows and you use a 64-bit Python, then you might want to build a 64-bit version of libmecab.dll.