abseil / abseil-py

Abseil Common Libraries (Python)
Apache License 2.0
2.27k stars 246 forks source link

class ArgumentParser(Generic[_T], metaclass=_ArgumentParserCache): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases #277

Closed MDENDAN closed 5 months ago

MDENDAN commented 5 months ago

I install tensorflow=1.14 along with cudatoolkit=10.0 in a new conda environment. on installing and restarting the system I tried to import tensorflow but I got err from: abls\flags_argument_parser.py class ArgumentParser(Generic[_T], metaclass=_ArgumentParserCache): TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

I checked th version of absl-py it is 2.0.0 What can be done?

yilei commented 5 months ago

Which Python version are you using? It can be an error in Python 3.6 or earlier, and absl-py 2.0.0 has dropped support for Python 3.6.

MDENDAN commented 5 months ago

Yes I have installed python version 3.6 in the environment.

yilei commented 5 months ago

You'll either need to use newer Python versions or downgrade absl-py to pre 2.0.0.