Pythonパッケージ、textract
をインストールしようとしていますが、pulseaudio.h
に言及するエラーが発生します。
Textractをインストールしようとしているときの正確なエラーは次のとおりです。
$ Sudo pip install textract
Collecting textract
Using cached textract-1.6.1.tar.gz
Requirement already satisfied: argcomplete==1.8.2 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: chardet==2.3.0 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: python-pptx==0.6.5 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: docx2txt==0.6 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: beautifulsoup4==4.5.3 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: xlrd==1.0.0 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: EbookLib==0.15 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: SpeechRecognition==3.6.3 in /usr/local/lib/python2.7/site-packages (from textract)
Requirement already satisfied: six==1.10.0 in /usr/local/lib/python2.7/site-packages (from textract)
Collecting pocketsphinx==0.1.3 (from textract)
Using cached pocketsphinx-0.1.3.Zip
Requirement already satisfied: lxml>=3.1.0 in /usr/local/lib64/python2.7/site-packages (from python-pptx==0.6.5->textract)
Requirement already satisfied: Pillow>=2.6.1 in /usr/local/lib64/python2.7/site-packages (from python-pptx==0.6.5->textract)
Requirement already satisfied: XlsxWriter>=0.5.7 in /usr/local/lib/python2.7/site-packages (from python-pptx==0.6.5->textract)
Requirement already satisfied: olefile in /usr/local/lib/python2.7/site-packages (from Pillow>=2.6.1->python-pptx==0.6.5->textract)
Installing collected packages: pocketsphinx, textract
Running setup.py install for pocketsphinx ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-JU_tHz/pocketsphinx/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-XW683a-record/install-record.txt --single-version-externally-managed --compile:
running install
running build_ext
building 'sphinxbase._ad' extension
swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/Android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/swig
creating build/temp.linux-x86_64-2.7/swig/sphinxbase
creating build/temp.linux-x86_64-2.7/deps
creating build/temp.linux-x86_64-2.7/deps/sphinxbase
creating build/temp.linux-x86_64-2.7/deps/sphinxbase/src
creating build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/Android -I/usr/include/python2.7 -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-2.7/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/Android -I/usr/include/python2.7 -c deps/sphinxbase/src/libsphinxad/ad_Pulse.c -o build/temp.linux-x86_64-2.7/deps/sphinxbase/src/libsphinxad/ad_Pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
deps/sphinxbase/src/libsphinxad/ad_Pulse.c:44:30: fatal error: Pulse/pulseaudio.h: No such file or directory
#include <Pulse/pulseaudio.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-JU_tHz/pocketsphinx/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-XW683a-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-JU_tHz/pocketsphinx/
いくつかのグーグルがlibpulse-dev
をインストールするように言及しているので、Sudo yum install libpulse-dev
を実行しようとしましたが、利用できないと表示されます。そのコマンドからの出力は次のとおりです。
Loaded plugins: priorities, update-motd, upgrade-helper
No package libpulse-dev available.
Error: Nothing to do
私は今何を試すべきかについてちょっと行き詰まっています
まず、Ubuntuにlibpulse-dev
をインストールするか、Fedoraにpulseaudio-libs-devel
をインストールする必要があります。
Sudo apt-get install libpulse-dev
を試してくださいSudo dnf install pulseaudio-libs-devel
を試してください。少なくともこれは私にとってはうまくいきます。