Python 语法错误:打印的语法无效(file=saveto,*args,**kwargs)

Python 语法错误:打印的语法无效(file=saveto,*args,**kwargs),python,syntax-error,python-2.x,rouge,Python,Syntax Error,Python 2.x,Rouge,我在安装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>

我在安装
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

我不知道出了什么问题,也不知道什么是
saveto
。请给我一些见解,谢谢。

print
是Python 2中的一个语句,只在Python 3中成为一个函数,但是如果您想在Python 2中将其用作函数,可以添加:

from __future__ import print_function

在使用
打印
功能之前。

这个问题与其他问题有什么不同?
from __future__ import print_function