mecab-python3がインストールできない
macでターミナルを使ってMecabをインストールするために、
https://qiita.com/taroc/items/b9afd914432da08dafc8
こちらのサイトを参考にさせていただきながら進めているのですが、
pip install mecab-python3
をした後に、以下のようなエラーメッセージが発生してしまい、インストールできません。
一応、ターミナルでmecabと入力してターミナル上でmecabを使用することはできました。
発生している問題・エラーメッセージ
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] MeCab_wrap.cxx:2375:23: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] res = SWIG_AddCast(res); ~~~ ^ ~~~ MeCab_wrap.cxx:2378:23: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] res = SWIG_AddCast(res); ~~~ ^ ~~~ MeCab_wrap.cxx:2900:9:warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (PyType_Ready(tp) < 0) ^~~~~~~~~~~~~~~~~~~~ MeCab_wrap.cxx:2924:10: note: uninitialized use occurs here return res; ^~~ MeCab_wrap.cxx:2900:5: note: remove the 'if' if its condition is always false if (PyType_Ready(tp) < 0) ^~~~~~~~~~~~~~~~~~~~~~~~~ MeCab_wrap.cxx:2881:10: note: initialize the variable 'res' to silence this warning int res; ^ = 0 MeCab_wrap.cxx:2987:10: fatal error: 'stdexcept' file not found #include <stdexcept> ^~~~~~~~~~~ 4 warnings and 1 error generated. error: command 'gcc' failed with exit status 1
手順としてやったこと
brew install mecab brew install mecab-ipadic brew install git curl xz git clone --depth 1 git@github.com:neologd/mecab-ipadic-neologd.git pip install mecab-python3
実行環境など
macOS mojave
Python 3.6.5 :: Anaconda, Inc.
稚拙な文章で申し訳ありませんが、どなたかわかる方がいればよろしくお願いします。
回答2件
あなたの回答
tips
プレビュー