danieldeutsch / sacrerouge

SacreROUGE is a library dedicated to the use and development of text generation evaluation metrics with an emphasis on summarization.
Apache License 2.0
140 stars 14 forks source link

Problem with setup for qaeval #121

Open Wendy-Xiao opened 3 years ago

Wendy-Xiao commented 3 years ago

Hi there, I have a problem setup qaeval. When I run sacrerouge setup-metric qa-eval, it always shows

Traceback (most recent call last):
  File "/net/nfs.cs/s2-research/wenx/miniconda3/envs/qaeval2/bin/sacrerouge", line 8, in <module>
    sys.exit(main())
  File "/net/nfs.cs/s2-research/wenx/miniconda3/envs/qaeval2/lib/python3.7/site-packages/sacrerouge/__main__.py", line 5, in main
    parser = build_argument_parser()
  File "/net/nfs.cs/s2-research/wenx/miniconda3/envs/qaeval2/lib/python3.7/site-packages/sacrerouge/arguments.py", line 10, in build_argument_parser
    import_module_and_submodules('sacrerouge')
  File "/net/nfs.cs/s2-research/wenx/miniconda3/envs/qaeval2/lib/python3.7/site-packages/sacrerouge/common/util.py", line 101, in import_module_and_submodules
    if path_string and module_finder.path != path_string:
AttributeError: 'zipimport.zipimporter' object has no attribute 'path'

It worked the the first time I installed it several days ago, but it does not work now, when I create a new virtual environment on a new linux machine.

Thanks!

danieldeutsch commented 3 years ago

Thanks for raising this issue. Nothing has changed in a long time, so I suspect something about your new environment changed.

What Python version was the previous one you tried? I generally use 3.6, so I guess it is possible that that code does not run with 3.7.