Skip to content
Brooke M. Fujita edited this page Oct 2, 2021 · 7 revisions

Requirements

natto-py requires the following:

The following Python 3 versions are supported:

If you are using Python 2, please use natto-py version 0.9.2.

Installing MeCab from source

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

Installing MeCab via a package manager

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

Installing MeCab on Windows

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.


Home | Next