Skip to content

paddlex --install , matplotlib 在安装时尝试源码构建报错 #4267

Open
@monkeycc

Description

@monkeycc

python 3.11
win11
conda

paddlex --install --platform gitee.com

  Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl (11 kB)
Building wheels for collected packages: matplotlib
  DEPRECATION: Building 'matplotlib' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'matplotlib'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for matplotlib (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [600 lines of output]
      C:\Users\monke\AppData\Local\Temp\pip-install-5dskhaqp\matplotlib_36a2e026419749a79a17de6c686167fb\setup.py:70: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
      !!

              ********************************************************************************
              Please remove any references to `setuptools.command.test` in all supported versions of the affected package.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.
              ********************************************************************************

      !!
        class NoopTestCommand(setuptools.command.test.test):

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

      BUILDING MATPLOTLIB
            python: yes [3.11.13 | packaged by conda-forge | (main, Jun  4 2025,
                        14:39:58) [MSC v.1943 64 bit (AMD64)]]
          platform: yes [win32]
             tests: no  [skipping due to configuration]
            macosx: no  [Mac OS-X only]

      D:\anaconda3\envs\paddle_3.11\Lib\site-packages\setuptools\__init__.py:92: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.

              By 2025-Oct-31, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      D:\anaconda3\envs\paddle_3.11\Lib\site-packages\setuptools\dist.py:804: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
      !!

              ********************************************************************************
              Please replace its usage with implicit namespaces (PEP 420).

              See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
              ********************************************************************************

      !!
        ep.load()(self, ep.name, value)
      D:\anaconda3\envs\paddle_3.11\Lib\site-packages\setuptools\dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: Python Software Foundation License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-311
      copying lib\pylab.py -> build\lib.win-amd64-cpython-311

      copying lib\matplotlib\mpl-data\fonts\afm\phvlo8a.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: Failed to build installable wheels for some pyproject.toml based projects (matplotlib)
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\anaconda3\envs\paddle_3.11\Scripts\paddlex.exe\__main__.py", line 7, in <module>
  File "I:\AI\PaddleX\paddlex\__main__.py", line 26, in console_entry
    main()
  File "I:\AI\PaddleX\paddlex\paddlex_cli.py", line 441, in main
    install(args)
  File "I:\AI\PaddleX\paddlex\paddlex_cli.py", line 308, in install
    setup(
  File "I:\AI\PaddleX\paddlex\repo_manager\core.py", line 202, in setup
    installer.install(
  File "I:\AI\PaddleX\paddlex\repo_manager\repo.py", line 280, in install
    self.install_deps(constraints=constraints, deps_to_replace=deps_to_replace)
  File "I:\AI\PaddleX\paddlex\repo_manager\repo.py", line 328, in install_deps
    install_packages_from_requirements_file(
  File "I:\AI\PaddleX\paddlex\utils\install.py", line 58, in install_packages_from_requirements_file
    return subprocess.check_call(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\anaconda3\envs\paddle_3.11\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\\anaconda3\\envs\\paddle_3.11\\python.exe', '-m', 'pip', 'install', '-c', 'C:\\Users\\monke\\AppData\\Local\\Temp\\tmpgxnt9ujf.txt', '-c', 'C:\\Users\\monke\\AppData\\Local\\Temp\\tmp3nz4c7c5\\constraints.txt', '-r', 'C:\\Users\\monke\\AppData\\Local\\Temp\\tmp3nz4c7c5\\requirements.txt']' returned non-zero exit status 1.

直接用conda install -c conda-forge matplotlib后也是一样

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions