Search code examples
pythonmatplotlibalpine-linux

How to resolve "ERROR: Could not build wheels for matplotlib, which is required to install pyproject.toml-based projects" with Python 3.9.12?


I am encountering the following error when attempting to install matplotlib in an alpine Docker image:

 error: Failed to download any of the following: ['http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz'].  Please download one of these urls and extract it into 'build/' at the top-level of the source repository.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for matplotlib
Failed to build matplotlib
ERROR: Could not build wheels for matplotlib, which is required to install pyproject.toml-based projects

My Python version is 3.9.12. How can I resolve this error?


Solution

  • This solved my problem:

    pip install matplotlib==3.2.1