open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5.35k stars 1.55k forks source link

[Bug] Error at installation of mmdet3d ERROR: Failed building wheel for matplotlib (version 3.5.3) #3019

Closed summit-cross closed 3 months ago

summit-cross commented 3 months ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

windows 11 cuda 12.5 python 3.11.9 pytorch 2.4.0 installed via the manufacturer's official commands: https://pytorch.org/get-started/locally/ mmcv 2.0.0rc4 mmdet 3.3.0 matplotlib 3.8.4

Reproduces the problem - code sample

mim install "mmdet3d>=1.4.0"

Reproduces the problem - command or script

mim install "mmdet3d>=1.4.0"

Reproduces the problem - error message

This is only the last part of the output. I have shortened the output, otherwise it is too long.

Building wheels for collected packages: matplotlib
  Building wheel for matplotlib (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [558 lines of output]

      Edit mplsetup.cfg to change the build options; suppress output with --quiet.

      BUILDING MATPLOTLIB
            python: yes [3.11.9 | packaged by Anaconda, Inc. | (main, Apr 19 2024,
                        16:40:41) [MSC v.1916 64 bit (AMD64)]]
          platform: yes [win32]
             tests: no  [skipping due to configuration]
            macosx: no  [Mac OS-X only]

      C:\Users\d.denker\.conda\envs\pythonProject1\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      C:\Users\d.denker\.conda\envs\pythonProject1\Lib\site-packages\setuptools\dist.py:285: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).
        warnings.warn(msg, SetuptoolsDeprecationWarning)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      copying lib\pylab.py -> build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\afm.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\animation.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\artist.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\axis.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\backend_bases.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\backend_managers.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\backend_tools.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\bezier.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\blocking_input.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\category.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\cm.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\collections.py -> build\lib.win-amd64-cpython-311\matplotlib
      copying lib\matplotlib\colorbar.py -> build\lib.win-amd64-cpython-311\matplotlib

      ..........

      copying lib\matplotlib\mpl-data\fonts\afm\putb8a.afm -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\afm
      copying lib\matplotlib\mpl-data\fonts\ttf\DejaVuSans-BoldOblique.ttf -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\ttf
      copying lib\matplotlib\mpl-data\images\hand.svg -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\images
      copying lib\matplotlib\mpl-data\sample_data\data_x_x2_x3.csv -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\sample_data
      copying lib\matplotlib\mpl-data\images\qt4_editor_options.svg -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\images
      copying lib\matplotlib\mpl-data\fonts\afm\cmex10.afm -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\afm
      copying lib\matplotlib\mpl-data\fonts\ttf\cmmi10.ttf -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\ttf
      copying lib\matplotlib\mpl-data\fonts\ttf\STIXNonUniBol.ttf -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\ttf
      copying lib\matplotlib\mpl-data\images\home.svg -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\images
      copying lib\matplotlib\mpl-data\images\zoom_to_rect.svg -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\images
      copying lib\matplotlib\mpl-data\stylelib\_mpl-gallery-nogrid.mplstyle -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\stylelib
      copying lib\matplotlib\backends\web_backend\js\nbagg_mpl.js -> build\lib.win-amd64-cpython-311\matplotlib\backends\web_backend\js
      copying lib\matplotlib\mpl-data\fonts\ttf\LICENSE_STIX -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\ttf
      copying lib\matplotlib\backends\web_backend\css\page.css -> build\lib.win-amd64-cpython-311\matplotlib\backends\web_backend\css
      copying lib\matplotlib\mpl-data\stylelib\seaborn-pastel.mplstyle -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\stylelib
      copying lib\matplotlib\mpl-data\fonts\ttf\cmex10.ttf -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\ttf
      copying lib\matplotlib\mpl-data\stylelib\seaborn-dark.mplstyle -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\stylelib
      copying lib\matplotlib\mpl-data\images\move.png -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\images
      copying lib\matplotlib\mpl-data\stylelib\seaborn-darkgrid.mplstyle -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\stylelib
      copying lib\matplotlib\mpl-data\fonts\afm\pcrb8a.afm -> build\lib.win-amd64-cpython-311\matplotlib\mpl-data\fonts\afm
      running build_ext
      Extracting /project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz
      Building freetype in build\freetype-2.6.1
      msbuild build\freetype-2.6.1\builds\windows\vc2010\freetype.sln /t:Clean;Build /p:Configuration=Release;Platform=x64
      error: command 'msbuild' failed: None
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for matplotlib
  Running setup.py clean for matplotlib
Failed to build matplotlib
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (matplotlib)

Additional information

Hello team, I hope you can help me. If I run the command mim install "mmdet3d>=1.4.0" it tries to install matplotlib 3.5.3, although I have already installed matplotlib 3.8.4. matplotlib 3.5.3 is downloaded and later during installation the following error occurs: ERROR: Failed building wheel for matplotlib. I tried nearly all versions of mmdet3d to install, except the first or second oldest listet on your page.

summit-cross commented 3 months ago

The problem is solved using Python 3.10. Version 3.11 is incompatible.