flops-counter.pytorch icon indicating copy to clipboard operation
flops-counter.pytorch copied to clipboard

Possible redundant dataclasses dependency

Open AndersonZhangyq opened this issue 4 years ago • 1 comments

When installing using pip with python 3.7, the following error occurs:

ERROR: Package 'dataclasses' requires a different Python: 3.7.9 not in '>=3.6, <3.7'

Then I try to run the source code directly, and it works well with python 3.7 and python 3.6.9. It seems that it's ok to remove the dataclasses dependency to better support python 3.7+

AndersonZhangyq avatar Nov 09 '20 03:11 AndersonZhangyq

The dataclasses dependency comes form pytorch 1.7 and I can't control it. ptflops doesn't implicitly requires dataclasses, but it leaks via pytorch during installation. The only thing I can propose here is to install ptflops ignoring all requirements (namely the torch package without a specified version):

pip install ptflops --no-deps

And then install a version of the torch package that would work on your config.

sovrasov avatar Nov 09 '20 09:11 sovrasov