PIP Install为什么不能用于PDFMiner?

时间:2019-08-10 20:19:40

标签: python

我正在尝试PIP安装PDFMiner,但出现语法错误。

使用PIP安装作为管理员

py -m pip安装PDFMinner

ERROR: Command errored out with exit status 1:
 command: 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ryan\\AppData\\Local\\Temp\\pip-install-61x3fs8f\\PDFMiner\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ryan\\AppData\\Local\\Temp\\pip-install-61x3fs8f\\PDFMiner\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: C:\Users\Ryan\AppData\Local\Temp\pip-install-61x3fs8f\PDFMiner\
Complete output (8 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Ryan\AppData\Local\Temp\pip-install-61x3fs8f\PDFMiner\setup.py", line 3, in <module>
    from pdfminer import __version__
  File "C:\Users\Ryan\AppData\Local\Temp\pip-install-61x3fs8f\PDFMiner\pdfminer\__init__.py", line 5
    print __version__
                    ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(__version__)?
----------------------------------------

错误:命令错误,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出。

1 个答案:

答案 0 :(得分:0)

PDFMiner适用于Py2.x,经过一番搜索后,我发现可以通过运行pip install pdfminer.six

来安装Py3.x版本。

链接到我在其中找到的GitHub:https://github.com/pdfminer/pdfminer.six