前提・実現したいこと
これからスクレイピングを勉強しようと思い、pythonを触っている初心者です。
mecab-python3を実行したところ、以下のエラーメッセージが表示され、インストールできません。
ネット検索し、一通り試したのですが改善できなかったので、わかる方お願いします。
###現状
$ brew install mecab
$ brew install mecab-ipadic
上記のコードでmecabを導入し、ターミナル上ではmecabを動かせている状態です。
はじめまして、デーモン閣下です
はじめまして 感動詞,,,,,,はじめまして,ハジメマシテ,ハジメマシテ
、 記号,読点,,,,,、,、,、
デーモン 名詞,一般,,,,,デーモン,デーモン,デーモン
閣下 名詞,一般,,,,,閣下,カッカ,カッカ
です 助動詞,,,,特殊・デス,基本形,です,デス,デス
EOS
発生している問題・エラーメッセージ
エラーメッセージ Collecting mecab-python3 Using cached https://files.pythonhosted.org/packages/ac/48/295efe525df40cbc2173748eb869290e81a57e835bc41f6d3834fc5dad5f/mecab-python3-0.996.1.tar.gz Building wheels for collected packages: mecab-python3 Running setup.py bdist_wheel for mecab-python3 ... error Complete output from command /Users/----/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/x4/6l7b_ks95vs594hcn1gcpb8r0000gn/T/pip-install-ptal4xeq/mecab-python3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/x4/6l7b_ks95vs594hcn1gcpb8r0000gn/T/pip-wheel-euvgf7fv --python-tag cp36: running bdist_wheel running build running build_py running build_ext building '_MeCab' extension swigging MeCab.i to MeCab_wrap.cpp swig -python -shadow -c++ -I/usr/local/include -o MeCab_wrap.cpp MeCab.i /usr/local/include/mecab.h:848: Warning 302: Identifier 'set_sentence' redefined by %extend (ignored), MeCab.i:89: Warning 302: %extend definition of 'set_sentence'. creating build creating build/temp.macosx-10.7-x86_64-3.6 gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/----/anaconda3/include -arch x86_64 -I/Users/----/anaconda3/include -arch x86_64 -I/usr/local/include -I/Users/----/anaconda3/include/python3.6m -c MeCab_wrap.cpp -o build/temp.macosx-10.7-x86_64-3.6/MeCab_wrap.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] In file included from /Users/----/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/syslimits.h:7:0, from /Users/----/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:34, from /Users/----/anaconda3/include/python3.6m/Python.h:11, from MeCab_wrap.cpp:173: /Users/----/anaconda3/lib/gcc/x86_64-apple-darwin11.4.2/4.8.5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory #include_next <limits.h> /* recurse down to the real one */ ^ compilation terminated. error: command 'gcc' failed with exit status 1 ### Users/----/ の----部分はユーザー名が入っておりますので伏せました。
試したこと
http://coreblog.org
https://teratail.com/questions/155142
この二つを中心に試しました。
補足情報(FW/ツールのバージョンなど)
macOS Mojave 10.14.2
pythonPython 3.6.7 | Anaconda1.9.6
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/17 15:16