以前から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/
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/26 03:52