facebookresearch / open_lth

A repository in preparation for open-sourcing lottery ticket hypothesis code.
MIT License
622 stars 113 forks source link

TypeError on abc.py #16

Open MarioMZhang opened 2 years ago

MarioMZhang commented 2 years ago

TypeError: Cannot create a consistent method resolution order (MRO) for bases ABC, Module

I tried different python version, but it did not work

Thanks in advance

youngryan1993 commented 2 years ago

Hello, I also had the same problem and have solved it.

I just recreate the conda environment with optimal configurations recommended by author. (Python 3.7 / PyTorch 1.4 / TorchVision 0.5.0 - no greater version!)

Hope this helps

chenw23 commented 2 years ago

For your information, it also works with PyTorch 1.4 / TorchVision 0.5.0 but Python 3.8. So keeping consistent PyTorch version should be sufficient to solve this problem.