Help us understand the problem. What is going on with this article?


More than 1 year has passed since last update.

pip install mecab-python3 でエラー

2019/01/15現在、Macデフォルトのgcc (xcode-select経由で入るもの)では mecab-python3 のインストール時にエラーが出る。

#include <stdexcept>
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1



$ brew install mecab
$ brew install mecab-ipadic


$ brew install gcc
$ ln -s /usr/local/bin/gcc-8 /usr/local/bin/gcc
$ ln -s /usr/local/bin/g++-8 /usr/local/bin/g++

.bash_profile なり .zshrc なりを編集して、
$ which gcc/usr/local/bin/gcc となるようにする。

mecab-python3 インストール

$ brew install swig
$ pip install mecab-python3


Deep learning engineer / creative developer. For more information, check out my portfolio website:
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away