Couldn't install textract in google colab

回眸只為那壹抹淺笑 提交于 2019-12-01 22:07:36
Souyama Debnath

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

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

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

In google colab Bash commands run by prefixing the command with ‘!’.

Example:

!apt update
!apt-get install libasound2-dev
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!