问题描述
我已按照 textract 网站上的说明进行操作,但由于 pocketsphinx
I have followed the instructions on the textract website, but I am getting an error because of pocketsphinx
我曾尝试使用 pip
单独安装 pocketsphinx
但出现同样的错误:
I have tried installing pocketsphinx
separtely using pip
but the same error occurs:
命令/usr/bin/python -u -c"导入安装工具,tokenize;file='/tmp/pip-build-drE9wI/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-nfLJNp-record/install-record.txt --single-version-externally-managed --compile" 失败,错误代码为 1/tmp/pip-build-drE9wI/pocketsphinx/
我正在尝试在 Ubuntu 16.04 上安装它.如果重要的话,我在虚拟机上运行它.
I am trying to install it on Ubuntu 16.04. If it matters, I am running it on a virtual machine.
推荐答案
缺少 libpulse-dev 依赖项,如果没有该依赖项,pocketsphinx 编译将失败.
There is a missing dependency for libpulse-dev without which the pocketsphinx compilation fails.
安装为
sudo apt-get install libpulse-dev
此外,在我的 Ubuntu 上,我必须安装其他几个依赖项才能使 textract 工作.
In addition, on my Ubuntu, i had to install several other dependencies to get textract working.
sudo apt-get install swig
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-de
sudo easy_install greenlet
sudo easy_install gevent
这篇关于由于 Pocketsphinx,无法在 Ubuntu 上安装 textract(用于 python 2.x)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!