ModuleNotFoundError:没有名为“mephisto.core”的模块

问题描述

我在 macOS Catalina 上使用最新版本的 mephisto。我正在尝试运行 parlai,特别是 acute_eval 任务。 根据 MephistoAcuteEVAL 的说明,我应该能够执行 run.py 并使任务运行。但是,我在运行时遇到此错误,使用以下命令:

python run.py --pairings_filepath=example/pairings.jsonl 

这是错误

Traceback (most recent call last):


File "run.py",line 17,in <module>
    from parlai.crowdsourcing.tasks.acute_eval.acute_eval_blueprint import BLUEPRINT_TYPE
File "/Users/molI/Opt/anaconda3/envs/py36/lib/python3.6/site-packages/parlai/crowdsourcing/tasks/acute_eval/acute_eval_blueprint.py",line 12,in <module>
    from mephisto.core.registry import register_mephisto_abstraction
ModuleNotFoundError: No module named 'mephisto.core'

解决方法

github 上的 ParlAI 安装说明指出需要 Python 3.7 或更高版本,但您似乎使用的是 Python 3.6。这很可能是问题的原因,如果您升级 Python 版本,程序应该可以运行。