質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Mecab

Mecabは、オープンソースの形態素解析エンジンです。 言語、辞書、コーパスに依存しない汎用的な設計を基本方針としています。 Mecabの由来は、開発者の好物である和布蕪(めかぶ)から名づけられました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Google

Googleは、アメリカ合衆国に位置する、インターネット関連のサービスや製品を提供している企業です。検索エンジンからアプリケーションの提供まで、多岐にわたるサービスを提供しています。

Q&A

解決済

1回答

2665閲覧

MeCabが使えなくなってしまいました。

kanpan

総合スコア20

Mecab

Mecabは、オープンソースの形態素解析エンジンです。 言語、辞書、コーパスに依存しない汎用的な設計を基本方針としています。 Mecabの由来は、開発者の好物である和布蕪(めかぶ)から名づけられました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Google

Googleは、アメリカ合衆国に位置する、インターネット関連のサービスや製品を提供している企業です。検索エンジンからアプリケーションの提供まで、多岐にわたるサービスを提供しています。

0グッド

0クリップ

投稿2018/11/24 03:29

以前からGoogle Colabで、MeCabを使用していたのですが、今日プログラムを動かしてみたところ、ビルドが失敗するようになっていました。プログラムの構文を全く変更していないため、何が原因か全くわかりません。解決方法をご教示ください。
#ソースコード

#MeCabインストール !apt install aptitude !aptitude install mecab libmecab-dev mecab-ipadic-utf8 git make curl xz-utils file -y !pip install mecab-python3

#実行結果

Reading package lists... Done Building dependency tree Reading state information... Done aptitude is already the newest version (0.8.10-6ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. mecab is already installed at the requested version (0.996-5) libmecab-dev is already installed at the requested version (0.996-5) mecab-ipadic-utf8 is already installed at the requested version (2.7.0-20070801+main-1) git is already installed at the requested version (1:2.17.1-1ubuntu0.3) make is already installed at the requested version (4.1-9.1ubuntu1) curl is already installed at the requested version (7.58.0-2ubuntu3.5) xz-utils is already installed at the requested version (5.2.2-1.3) file is already installed at the requested version (1:5.32-2ubuntu0.1) mecab is already installed at the requested version (0.996-5) libmecab-dev is already installed at the requested version (0.996-5) mecab-ipadic-utf8 is already installed at the requested version (2.7.0-20070801+main-1) git is already installed at the requested version (1:2.17.1-1ubuntu0.3) make is already installed at the requested version (4.1-9.1ubuntu1) curl is already installed at the requested version (7.58.0-2ubuntu3.5) xz-utils is already installed at the requested version (5.2.2-1.3) file is already installed at the requested version (1:5.32-2ubuntu0.1) No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 5 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. 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 /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-aov976do/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 /tmp/pip-wheel-za8k3rsq --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/include -o MeCab_wrap.cpp MeCab.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1 ---------------------------------------- Failed building wheel for mecab-python3 Running setup.py clean for mecab-python3 Failed to build mecab-python3 Installing collected packages: mecab-python3 Running setup.py install for mecab-python3 ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-aov976do/mecab-python3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-f5ywq1tm/install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building '_MeCab' extension swigging MeCab.i to MeCab_wrap.cpp swig -python -shadow -c++ -I/usr/include -o MeCab_wrap.cpp MeCab.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-aov976do/mecab-python3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-f5ywq1tm/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-aov976do/mecab-python3/

#failの部分だけ抜粋

Failed building wheel for mecab-python3 Running setup.py clean for mecab-python3 Failed to build mecab-python3 Installing collected packages: mecab-python3 Running setup.py install for mecab-python3 ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-cysx3zlp/mecab-python3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-jdpwa_c9/install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building '_MeCab' extension swigging MeCab.i to MeCab_wrap.cpp swig -python -shadow -c++ -I/usr/include -o MeCab_wrap.cpp MeCab.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-cysx3zlp/mecab-python3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-jdpwa_c9/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-cysx3zlp/mecab-python3/

よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

投稿2018/11/24 03:46

hayataka2049

総合スコア30933

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kanpan

2018/11/26 03:52

ありがとうございます。 正常に動作しました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問