Skip to content

Installation Now Requires to Build An Old matplotlib Distribution #145

Closed
@Arnou1

Description

@Arnou1

I have tried to install the latest spatialmath-python on macOS and Windows 11 through pip and building from source. However, none of my attempt was successful because they all failed to build matplotlib==3.5.1. When I specified the version of spatialmath to be 1.1.10, no error was raised and it also recognized and supported the newer matplotlib==3.9.0. This problem appears to persist from spatialmath-python 1.1.11 to 1.1.13. Below is the error message I got:

macOS

clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=local -Ibuild/freetype-2.6.1/include -Iextern/agg24-svn/include -I/Users/name/Documents/Python/torch/lib/python3.12/site-packages/numpy/core/include -I/Users/name/Documents/Python/torch/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/_backend_agg.cpp -o build/temp.macosx-15.0-arm64-cpython-312/matplotlib.backends._backend_agg/src/_backend_agg.o -fvisibility=hidden -flto
In file included from src/_backend_agg.cpp:5:
src/_backend_agg.h:9:10: fatal error: 'cmath' file not found
9 | #include
| ^~~~~~~
1 error generated.
error: command '/usr/bin/clang++' failed with exit code 1
[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)

Windows

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
Successfully built spatialmath-python
Failed to build matplotlib
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (matplotlib)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions