无法在 google colab 中安装 texttract

2023-11-29

我无法安装textract在google colab中,错误消息显示如下。

有些人建议使用sudo apt-get install libasound2-dev但怎么办sudo...在谷歌合作实验室?

===错误信息=============================================== =============

pocketsphinx 的构建轮失败运行 setup.py clean for pocketsphinx 无法构建 pocketsphinx 安装收集 软件包: pocketsphinx 为 pocketsphinx 运行 setup.py install ... 错误 命令 /usr/bin/python3 -u -c "import setuptools, 标记化;file='/tmp/pip-install-03c_ysbm/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(编译(代码,file,'执行'))”安装 --record /tmp/pip-record-6n9ewg9i/install-record.txt --单一版本-外部管理 --编译: 运行安装 运行 build_ext 构建“sphinxbase._sphinxbase”扩展 将 deps/sphinxbase/swig/sphinxbase.i 切换到 deps/sphinxbase/swig/sphinxbase_wrap.c swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i 无法执行“swig”:没有这样的文件或目录 错误:命令“swig”失败,退出状态为 1

=================================================== ========================= 谢谢你, 凌


不,你不能使用sudo因为你没有得到root访问 Colab。

问题是你不仅仅需要libasound2-dev但是一大堆包裹。检查 Debian 要求https://texttract.readthedocs.io/en/stable/installation.html

也为了打造sphinx(要求textract) 你需要libpulse-dev。这是更新后的命令列表。

!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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法在 google colab 中安装 texttract 的相关文章

随机推荐