Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't locate XML/Parser.pm in @INC #27

Open
sajastu opened this issue Dec 8, 2018 · 1 comment
Open

Can't locate XML/Parser.pm in @INC #27

sajastu opened this issue Dec 8, 2018 · 1 comment

Comments

@sajastu
Copy link

sajastu commented Dec 8, 2018

Hi,

I get this error when trying to run pyrouge.

Can't locate XML/Parser.pm in @inc (you may need to install the XML::Parser module) (@inc contains: ROUGE-1.5.5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ROUGE-1.5.5/XML/DOM.pm line 41.
BEGIN failed--compilation aborted at ROUGE-1.5.5/XML/DOM.pm line 70.
Compilation failed in require at ROUGE-1.5.5/ROUGE-1.5.5.pl line 177.
BEGIN failed--compilation aborted at ROUGE-1.5.5/ROUGE-1.5.5.pl line 177.
Traceback (most recent call last):
File "official_rouge.py", line 56, in
main()
File "official_rouge.py", line 52, in main
print_results(evaluate(args.gold, args.pred))
File "official_rouge.py", line 31, in evaluate
output = r.convert_and_evaluate()
File "/home/sajad/anaconda3/lib/python3.6/site-packages/pyrouge/Rouge155.py", line 361, in convert_and_evaluate
rouge_output = self.evaluate(system_id, rouge_args)
File "/home/sajad/anaconda3/lib/python3.6/site-packages/pyrouge/Rouge155.py", line 336, in evaluate
rouge_output = check_output(command).decode("UTF-8")
File "/home/sajad/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/home/sajad/anaconda3/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ROUGE-1.5.5/ROUGE-1.5.5.pl', '-e', 'ROUGE-1.5.5/data', '-c', '95', '-2', '-1', '-U', '-r', '1000', '-n', '4', '-w', '1.2', '-a', '-m', '/tmp/tmpub309057/rouge_conf.xml']' returned non-zero exit status 2.

I gotta say that I've installed XML::Parser via cpan XML::Parser.

Any ideas?

Thanks!

@coree
Copy link

coree commented Jan 24, 2019

For me the command sudo apt-get install libxml-parser-perl worked. However, the parser was not installed in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants