无法安装textract [英] Unable to install textract

查看:119
本文介绍了无法安装textract的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用命令pip install textract我无法在Ubuntu 16.04,Python 2上安装textract.

Using the command pip install textractI'm unable to install textract on my Ubuntu 16.04, Python 2.

我收到以下错误:

Collecting textract
Requirement already satisfied: python-pptx==0.6.5 in ./anaconda2/lib/python2.7/site-packages (from textract) (0.6.5)
Requirement already satisfied: docx2txt==0.6 in ./anaconda2/lib/python2.7/site-packages (from textract) (0.6)
Requirement already satisfied: six==1.10.0 in ./anaconda2/lib/python2.7/site-packages (from textract) (1.10.0)
Requirement already satisfied: xlrd==1.0.0 in ./anaconda2/lib/python2.7/site-packages (from textract) (1.0.0)
Requirement already satisfied: beautifulsoup4==4.5.3 in ./anaconda2/lib/python2.7/site-packages (from textract) (4.5.3)
Requirement already satisfied: argcomplete==1.8.2 in ./anaconda2/lib/python2.7/site-packages (from textract) (1.8.2)
Requirement already satisfied: EbookLib==0.15 in ./anaconda2/lib/python2.7/site-packages (from textract) (0.15)
Collecting pocketsphinx==0.1.3 (from textract)
  Using cached https://files.pythonhosted.org/packages/93/5f/a968e5d53d25e32deb78c3e169fd8612ecf53cc76e32cb40e19be35696af/pocketsphinx-0.1.3.tar.bz2
Collecting chardet==2.3.0 (from textract)
  Using cached https://files.pythonhosted.org/packages/7e/5c/605ca2daa5cf21c87690d8fe6ab05a6f2278c451f4ede6456dd26453f4bd/chardet-2.3.0-py2.py3-none-any.whl
Requirement already satisfied: SpeechRecognition==3.6.3 in ./anaconda2/lib/python2.7/site-packages (from textract) (3.6.3)
Requirement already satisfied: Pillow>=2.6.1 in ./anaconda2/lib/python2.7/site-packages (from python-pptx==0.6.5->textract) (5.0.0)
Requirement already satisfied: XlsxWriter>=0.5.7 in ./anaconda2/lib/python2.7/site-packages (from python-pptx==0.6.5->textract) (1.0.2)
Requirement already satisfied: lxml>=3.1.0 in ./anaconda2/lib/python2.7/site-packages (from python-pptx==0.6.5->textract) (4.1.1)
Building wheels for collected packages: pocketsphinx
  Running setup.py bdist_wheel for pocketsphinx ... error
  Complete output from command /home/satyam/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-L5494L/pocketsphinx/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-JVTDy9 --python-tag cp27:
  running bdist_wheel
  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 -B /home/satyam/anaconda2/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/satyam/anaconda2/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 -B /home/satyam/anaconda2/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/satyam/anaconda2/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
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pocketsphinx
  Running setup.py clean for pocketsphinx
Failed to build pocketsphinx
boto3 1.7.6 requires botocore<1.11.0,>=1.10.6, which is not installed.
s3transfer 0.1.13 requires botocore<2.0.0,>=1.3.0, which is not installed.
grin 1.2.1 requires argparse>=1.1, which is not installed.
tensorflow-gpu 1.2.0 has requirement markdown==2.2.0, but you'll have markdown 2.6.11 which is incompatible.
requests 2.18.4 has requirement chardet<3.1.0,>=3.0.2, but you'll have chardet 2.3.0 which is incompatible.
Installing collected packages: pocketsphinx, chardet, textract
  Running setup.py install for pocketsphinx ... error
    Complete output from command /home/satyam/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-L5494L/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-record-Dy07hO/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 -B /home/satyam/anaconda2/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/satyam/anaconda2/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 -B /home/satyam/anaconda2/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/satyam/anaconda2/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
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/satyam/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-L5494L/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-record-Dy07hO/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-L5494L/pocketsphinx/

当我尝试sudo apt-get install libpulse-dev时,出现以下错误:

When I try, sudo apt-get install libpulse-dev, I get the following error:

以下软件包具有未满足的依赖性: libpulse-dev:取决于:libglib2.0-dev,但是不会被安装 E:无法纠正问题,您拿着破损的包裹.

The following packages have unmet dependencies: libpulse-dev : Depends: libglib2.0-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.

我曾尝试使用"aptitude"安装,但安装了libpulse-dev,但具有aptitude的textract的错误是它无法找到该软件包.

Thogh, I tried installing with 'aptitude', libpulse-dev gets installed but the error for textract with aptitude is that it is not able to locate that package.

推荐答案

请安装以下内容:

sudo apt-get install libglib2.0-0=2.48.0-1ubuntu4
sudo apt-get install libglib2.0-dev
sudo apt-get install libpulse-dev
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

如果上述命令不起作用,就可以了

If the above command doesn't work, it's fine

sudo easy_install greenlet
sudo easy_install gevent
pip install textract

这篇关于无法安装textract的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆