关于pdf:pdf2text与Python 3.7版本不兼容

pdf2text not compatible with Python 3.7 version

我正在尝试在计算机上安装python 3.7的情况下安装pdf2text,但出现错误

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(version)?
Missing parentheses in call to 'print'. Did you mean print(version)?

还有其他解决方案吗,我需要pdf2text从pdf文件中提取一些非结构化表,并且基于stackoverflow上这篇文章的内容,pdf2text似乎可以很好地与非结构化表提取一起使用。


看起来像python 2.x的库,您可以尝试安装pdftotext:

1
pip install pdftotext

或者您可以下载pdf2text wheel并为python 3配置它,例如:

print versionprint(version)