Skip to content

Error on install from matplotlib #65

@jmrfox

Description

@jmrfox

Hi, I am trying to install using venv and pip install uncertainpy. Both Win10 and Debian give me an error when the install gets to the matplotlib portion. This seems to be the important bit:

checkdep_freetype2.c
      src/checkdep_freetype2.c(5): fatal error C1189: #error:  "FreeType version 2.3 or higher is required. You may set the MPLLOCALFREETYPE environment variable to 1 to let Matplotlib download it."
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (matplotlib)

I copied this snippet from Windows, but a similar thing happens on Linux.

UPDATING build/lib.linux-x86_64-cpython-311/matplotlib/_version.py
      set build/lib.linux-x86_64-cpython-311/matplotlib/_version.py to '3.1.3'
      running build_ext
      building 'matplotlib.ft2font' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DFREETYPE_BUILD_TYPE=system -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -I/home/jordan/neuro/neuro-venv/lib/python3.11/site-packages/numpy/core/include -I/home/jordan/neuro/neuro-venv/include -I/usr/include/python3.11 -c src/checkdep_freetype2.c -o build/temp.linux-x86_64-cpython-311/src/checkdep_freetype2.o
      src/checkdep_freetype2.c:1:10: fatal error: ft2build.h: No such file or directory
          1 | #include <ft2build.h>
            |          ^~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Rolling back uninstall of matplotlib

Any ideas? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions