前提・実現したいこと
MeCabをpython3にインストールしたいが以下のエラーがでます。対処を教えてください。
Python3.6.5
anadoda3-5.2
Ubuntu18.04
※書籍で勉強しています。
発生している問題・エラーメッセージ
$ pip3 install mecab-python3 Collecting mecab-python3 Downloading https://files.pythonhosted.org/packages/ac/48/295efe525df40cbc2173748eb869290e81a57e835bc41f6d3834fc5dad5f/mecab-python3-0.996.1.tar.gz Building wheels for collected packages: mecab-python3 Building wheel for mecab-python3 (setup.py) ... error Complete output from command /home/User/.pyenv/versions/anaconda3-5.2.0/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_0warbr_/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-yqe2xhlb --python-tag cp36: /home/User/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) 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 /home/User/.pyenv/versions/anaconda3-5.2.0/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_0warbr_/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-6oh17sp6/install-record.txt --single-version-externally-managed --compile: /home/User/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) 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 "/home/User/.pyenv/versions/anaconda3-5.2.0/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_0warbr_/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-6oh17sp6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-_0warbr_/mecab-python3/
その前にインストールしたこと
上記の前にこれをインストールしています。
$ sudo apt-get install -y libmecab-dev mecab-ipadic
$ sudo apt-get install -y mecab-ipadic-utf8
$ sudo apt-get install -y libc6-dev build-essential
回答1件
あなたの回答
tips
プレビュー