chakki-works/seqeval

seqeval 1.2.2: module 'enum' has no attribute 'Flag'

rsuwaileh opened this issue · 2 comments

When I use the old latest version within my python code I get the following error. The problem is solved when I uninstall it and installed the old version 0.0.12!

    from seqeval.metrics import f1_score, precision_score, recall_score, classification_report
  File "/opt/anaconda3/envs/lm_training/lib/python3.5/site-packages/seqeval/metrics/__init__.py", line 1, in <module>
    from seqeval.metrics.sequence_labeling import (accuracy_score,
  File "/opt/anaconda3/envs/lm_training/lib/python3.5/site-packages/seqeval/metrics/sequence_labeling.py", line 14, in <module>
    from seqeval.metrics.v1 import SCORES, _precision_recall_fscore_support
  File "/opt/anaconda3/envs/lm_training/lib/python3.5/site-packages/seqeval/metrics/v1.py", line 8, in <module>
    from seqeval.scheme import Entities, Token, auto_detect
  File "/opt/anaconda3/envs/lm_training/lib/python3.5/site-packages/seqeval/scheme.py", line 27, in <module>
    class Prefix(enum.Flag):
AttributeError: module 'enum' has no attribute 'Flag'

I need the new version that has the fixes of issues reported in the "issues" tab of this repo so I can't use the old version.

My environment:

  • OS: Ubuntu 18.04
  • Python Version: 3.5.6
  • Package Version: seqeval 1.2.2

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.70. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Please use Python3.6+.