Closed yongshangli closed 4 months ago
I also have the same error with pip install ptflops
.
Use pip install --upgrade git+https://github.com/sovrasov/flops-counter.pytorch.git
.
@yongshangli @synml please check the latest package version (0.7.2.2)
Collecting ptflops Using cached ptflops-0.7.2.1.tar.gz (14 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: torch in d:\app\miniconda3\envs\mmseg\lib\site-packages (from ptflops) (2.1.2) Requirement already satisfied: filelock in d:\app\miniconda3\envs\mmseg\lib\site-packages (from torch->ptflops) (3.13.1) Requirement already satisfied: typing-extensions in d:\app\miniconda3\envs\mmseg\lib\site-packages (from torch->ptflops) (4.9.0) Requirement already satisfied: sympy in d:\app\miniconda3\envs\mmseg\lib\site-packages (from torch->ptflops) (1.12) Requirement already satisfied: networkx in d:\app\miniconda3\envs\mmseg\lib\site-packages (from torch->ptflops) (3.1) Requirement already satisfied: jinja2 in d:\app\miniconda3\envs\mmseg\lib\site-packages (from torch->ptflops) (3.1.2) Collecting fsspec (from torch->ptflops) Using cached fsspec-2023.12.2-py3-none-any.whl.metadata (6.8 kB) Requirement already satisfied: MarkupSafe>=2.0 in d:\app\miniconda3\envs\mmseg\lib\site-packages (from jinja2->torch->ptflops) (2.1.3) Requirement already satisfied: mpmath>=0.19 in d:\app\miniconda3\envs\mmseg\lib\site-packages (from sympy->torch->ptflops) (1.3.0) Using cached fsspec-2023.12.2-py3-none-any.whl (168 kB) Building wheels for collected packages: ptflops Building wheel for ptflops (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [100 lines of output] running bdist_wheel running build running build_py creating build creating build\lib creating build\lib\ptflops copying C:\Users\yongs\AppData\Local\Temp\pip-install-918vnlpx\ptflops_2db49442faef4833af92f4dda674e13d\ptflops\flops_counter.py -> build\lib\ptflops copying C:\Users\yongs\AppData\Local\Temp\pip-install-918vnlpx\ptflops_2db49442faef4833af92f4dda674e13d\ptflops\pytorch_engine.py -> build\lib\ptflops copying C:\Users\yongs\AppData\Local\Temp\pip-install-918vnlpx\ptflops_2db49442faef4833af92f4dda674e13d\ptflops\pytorch_ops.py -> build\lib\ptflops copying C:\Users\yongs\AppData\Local\Temp\pip-install-918vnlpx\ptflops_2db49442faef4833af92f4dda674e13d\ptflops\utils.py -> build\lib\ptflops copying C:\Users\yongs\AppData\Local\Temp\pip-install-918vnlpx\ptflops_2db49442faef4833af92f4dda674e13d\ptflops__init__.py -> build\lib\ptflops D:\App\miniconda3\envs\mmseg\lib\site-packages\setuptools_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ptflops Running setup.py clean for ptflops Failed to build ptflops ERROR: Could not build wheels for ptflops, which is required to install pyproject.toml-based projects
I'm sorry, but I got this problem. win11, python3.10, torch2.1, torchvision0.16