【问题标题】:Errors installing Pyrouge安装 Pyrouge 时出错
【发布时间】:2016-03-07 03:45:20
【问题描述】:

我目前正在尝试安装 pyrouge,但出现以下错误

======================================================================
ERROR: test_options (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pyrouge/tests/Rouge155_test.py", line 218, in test_options
    pyrouge_output = check_output_clean(pyrouge_command)
  File "/usr/local/lib/python2.7/dist-packages/pyrouge/tests/Rouge155_test.py", line 17, in <lambda>
    check_output_clean = lambda c: check_output(c).decode("UTF-8").strip()
  File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

======================================================================
ERROR: test_write_config (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pyrouge/tests/Rouge155_test.py", line 197, in test_write_config
    check_output(command.split())
  File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

----------------------------------------------------------------------

我正在运行 Ubuntu,并且我已经使用 synaptic 包安装程序安装了 XML::DOM。

此外,我已经运行了 pyrouge_set_rouge_path.py 命令并将其定向到我的 ROUGE 目录。我在所有安装中都使用了 sudo。

【问题讨论】:

  • 你使用 sudo 吗?如果没有,请尝试一下。
  • 是的,我用过 sudo。我将把它添加到问题中。
  • 您找到解决方案了吗,我遇到了同样的错误?

标签: python ubuntu installation rouge


【解决方案1】:

在Rouge155_test.py文件中,修改两行:

修改

"pyrouge_evaluate_plain_text_files.py -m {} -s {} -sfp "

"pyrouge_evaluate_plain_text_files -m {} -s {} -sfp "

而且, 修改

"pyrouge_write_config_file.py -m {m} -s {s} " 

"pyrouge_write_config_file -m {m} -s {s} " 

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-01-29
    • 2018-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-12
    • 2013-10-05
    相关资源
    最近更新 更多