benjaminp / six

Python 2 and 3 compatibility library
https://six.readthedocs.io/
MIT License
987 stars 274 forks source link

What version of collections_abc is supported? #360

Closed its-ogawa closed 2 years ago

its-ogawa commented 3 years ago

I am using espnet. When I do the following import, I get a module error for six.

I am using version 1.16.0 of six. When or if will I be able to use collections_abc in my version?

from espnet2.bin.asr_inference import Speech2Text
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-47-ac1ff49579bc> in <module>
      3 import string
      4 from espnet_model_zoo.downloader import ModelDownloader
----> 5 from espnet2.bin.asr_inference import Speech2Text
      6 
      7 

... snip ...

/opt/conda/lib/python3.7/site-packages/wandb/util.py in <module>
     41 from six.moves import queue, input
     42 from sys import getsizeof
---> 43 from six.moves.collections_abc import Mapping, Sequence
     44 from importlib import import_module
     45 import sentry_sdk

ModuleNotFoundError: No module named 'six.moves.collections_abc'
YKdvd commented 2 years ago

It's always doing something like:

import six
print(six.__version__, six.__file__)

as close as possible to the problem code, and check to make sure you are running the copy of six you think you are, and the version. For instance, The 3D program Maya provides an ancient copy of six as part of its MASH plugin, and it wound up higher on sys.path than the copy of six we had made available. We had to adjust our sys.path addition to be higher than Maya's. There might be something similar here with this "wandb" package the stacktrace mentions, or elsewhere in the Python environment.

SCZwangxiao commented 1 year ago

It's always doing something like:

import six
print(six.__version__, six.__file__)

as close as possible to the problem code, and check to make sure you are running the copy of six you think you are, and the version. For instance, The 3D program Maya provides an ancient copy of six as part of its MASH plugin, and it wound up higher on sys.path than the copy of six we had made available. We had to adjust our sys.path addition to be higher than Maya's. There might be something similar here with this "wandb" package the stacktrace mentions, or elsewhere in the Python environment.

Thank you! You've just saved my life, hhhh.