ImportError: cannot import name 'Sequence' from 'collections'
Additional information
Cause the collections is changed in py3.10, the old way to import Sequence from collections doesn't work.
Solution:
Change
from collections. import Sequence (mmrotate/models/detectors/refine_single_stage.py, line1)
into
from collections.abc import Sequence
Everything will be OK.
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
master branch https://github.com/open-mmlab/mmrotate
Environment
Reproduces the problem - code sample
Reproduces the problem - command or script
Reproduces the problem - error message
Additional information
Cause the
collections
is changed in py3.10, the old way to importSequence
fromcollections
doesn't work. Solution: Changefrom collections. import Sequence
(mmrotate/models/detectors/refine_single_stage.py
, line1) intofrom collections.abc import Sequence
Everything will be OK.