【发布时间】:2017-07-05 04:13:04
【问题描述】:
我正在尝试使用 textract 将我的 .doc 文件转换为纯文本。
import textract
text = textract.process('path/to/file.extension')
但是我收到了这个错误
AttributeError: 'module' object has no attribute 'process'
【问题讨论】:
-
您使用的是哪个版本的文本?
-
@Tanu 我正在使用 1.6.1
-
您是否成功安装了所有其他依赖项? -
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 libpulse-dev(适用于 Ubuntu)。在我的系统上运行良好。 -
@tanu 我不知道我需要 Textract 的这些其他依赖项。我有 Windows,我还应该安装它们吗?
标签: python ms-word text-extraction