简体   繁体   English

由于pocketsphinx无法在Ubuntu上安装textract(对于python 2.x)

[英]Can't install textract (for python 2.x) on Ubuntu because of pocketsphinx

I have followed the instructions on the textract website, but I am getting an error because of pocketsphinx 我已经按照textract网站上的说明进行了操作,但是由于使用了pocketsphinx而出现了错误

I have tried installing pocketsphinx separtely using pip but the same error occurs: 我尝试使用pip安装pocketsphinx但发生相同的错误:

Command "/usr/bin/python -u -c "import setuptools, tokenize; 命令“ / usr / bin / python -u -c”导入设置工具,标记化; 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" failed with error code 1 in /tmp/pip-build-drE9wI/pocketsphinx/ 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-版本外部管理的--compile“失败,错误代码为/ tmp / pip-build-drE9wI / pocketsphinx /

I am trying to install it on Ubuntu 16.04. 我正在尝试在Ubuntu 16.04上安装它。 If it matters, I am running it on a virtual machine. 如果有关系,我可以在虚拟机上运行它。

There is a missing dependency for libpulse-dev without which the pocketsphinx compilation fails. libpulse-dev缺少依赖项,如果没有依赖项,pocketsphinx编译将失败。

Install it as 安装为

sudo apt-get install libpulse-dev

In addition, on my Ubuntu, i had to install several other dependencies to get textract working. 另外,在我的Ubuntu上,我必须安装其他几个依赖项才能使textract正常工作。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM