我正在尝试PIP安装PDFMiner,但出现语法错误。
以管理员身份使用PIP安装
py -m管道安装PDFM内部
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:pythonsetup.pyegg_info检查日志以获取完整的命令输出。
1条答案
按热度按时间bfnvny8b1#
PDFMiner适用于Py2.x,在谷歌上搜索了一下之后,我发现Py3.x版本可以通过运行
pip install pdfminer.six
来安装链接到GitHub,我在那里找到了这个:https://github.com/pdfminer/pdfminer.six