我正在关注这个repo进行安装files2rouge
,然后出现如下错误:
Traceback (most recent call last):
File "setup_rouge.py", line 7, in <module>
from files2rouge import settings
File "/home/cerdas/files2rouge/files2rouge/__init__.py", line 2, in <module>
from files2rouge.files2rouge import main
File "/home/cerdas/files2rouge/files2rouge/files2rouge.py", line 17, in <module>
from files2rouge import utils
File "/home/cerdas/files2rouge/files2rouge/utils.py", line 16
print(file=saveto, *args, **kwargs)
^
SyntaxError: invalid syntax
这里遇到错误的代码行:
def tee(saveto, *args, **kwargs):
"""Mimic the tee command, write on both stdout and file
"""
print(args, kwargs)
if saveto is not None:
print(file=saveto, *args, **kwargs)
我不知道出了什么问题,也不知道是什么原因saveto
。请给我一些见解,谢谢。