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

问题描述

我无法在Google colab中安装textract,错误消息如下所示.

I couldn't install textract in google colab, error message showing as below.

有人建议使用sudo apt-get install libasound2-dev,但是如何在Google colab中使用sudo...?

some people suggest to use sudo apt-get install libasound2-dev but how to do sudo... in google colab?

===错误消息=========================================== ================

=== error message ==========================================================

================================================ ===========================谢谢,灵

===========================================================================Thank you,Ling

推荐答案

不,您不能使用sudo,因为您无法获得colab的root访问权限.

Nope you can't use sudo because you don't get root access for colab.

问题在于您不仅需要libasound2-dev,而且还需要大量软件包.在 https://textract.readthedocs.io/en/stable/installation中检查debian要求. html

The problem is that you don't just need libasound2-dev but a whole host of packages. Check debian requirements in https://textract.readthedocs.io/en/stable/installation.html

此外,为了构建sphinx(textract的要求),您还需要libpulse-dev.这是更新的命令列表.

Also in order to build sphinx (a requirement for textract) you need libpulse-dev. So here is the updated command list.

!apt-get install python-dev libxml2-dev libxslt1-dev antiword unrtf poppler-utils \
     pstotext tesseract-ocr \
     flac ffmpeg lame libmad0 libsox-fmt-mp3 sox libjpeg-dev swig libasound2-dev libpulse-dev
!pip install git+https://github.com/deanmalmgren/textract

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

07-23 04:43
查看更多