manim
manim copied to clipboard
Build error with pip on macOS Ventura 13.0
Describe the bug
When building with python -m pip install manimgl
on macOS Ventura 13.0, the build will fail with ERROR: Could not build wheels for manimpango, which is required to install pyproject.toml-based projects
.
Code:
python -m pip install manimgl
Wrong display or Error traceback:
× Building wheel for manimpango (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AssertionError:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-12-arm64-cpython-310
creating build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/_version.py -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/__init__.py -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/utils.py -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/cmanimpango.pxd -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/cairo.pxd -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/register_font.pxd -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/pango.pxd -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/glib.pxd -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/enums.pyx -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/register_font.pyx -> build/lib.macosx-12-arm64-cpython-310/manimpango
copying manimpango/cmanimpango.pyx -> build/lib.macosx-12-arm64-cpython-310/manimpango
running build_ext
building 'manimpango.cmanimpango' extension
creating build/temp.macosx-12-arm64-cpython-310
creating build/temp.macosx-12-arm64-cpython-310/manimpango
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/harfbuzz/5.3.0/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/glib/2.74.0/include -I/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi -I/opt/homebrew/Cellar/harfbuzz/5.3.0/include/harfbuzz -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo -I/opt/homebrew/Cellar/glib/2.74.0/include -I/opt/homebrew/Cellar/glib/2.74.0/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.74.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.40/include -I/opt/homebrew/Cellar/pixman/0.40.0/include/pixman-1 -I/opt/homebrew/Cellar/fontconfig/2.14.0/include -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/libpng/1.6.38/include/libpng16 -I/opt/homebrew/Cellar/libxcb/1.15/include -I/opt/homebrew/Cellar/libxrender/0.9.10/include -I/opt/homebrew/Cellar/libxext/1.3.4/include -I/opt/homebrew/Cellar/libx11/1.8.1/include -I/opt/homebrew/Cellar/libxcb/1.15/include -I/opt/homebrew/Cellar/libxau/1.0.10/include -I/opt/homebrew/Cellar/libxdmcp/1.1.3/include -I/opt/homebrew/Cellar/xorgproto/2022.2/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/ffi -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/harfbuzz/5.3.0/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/glib/2.74.0/include -I/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi -I/opt/homebrew/Cellar/cairo/1.16.0_5/include/cairo -I/opt/homebrew/Cellar/pixman/0.40.0/include/pixman-1 -I/opt/homebrew/Cellar/libpng/1.6.38/include/libpng16 -I/opt/homebrew/Cellar/libxcb/1.15/include -I/opt/homebrew/Cellar/libxrender/0.9.10/include -I/opt/homebrew/Cellar/libxext/1.3.4/include -I/opt/homebrew/Cellar/libx11/1.8.1/include -I/opt/homebrew/Cellar/libxcb/1.15/include -I/opt/homebrew/Cellar/libxau/1.0.10/include -I/opt/homebrew/Cellar/libxdmcp/1.1.3/include -I/opt/homebrew/Cellar/glib/2.74.0/include -I/opt/homebrew/Cellar/harfbuzz/5.3.0/include/harfbuzz -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/glib/2.74.0/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.74.0/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre2/10.40/include -I/opt/homebrew/Cellar/fontconfig/2.14.0/include -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/Cellar/xorgproto/2022.2/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/ffi -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c manimpango/cmanimpango.c -o build/temp.macosx-12-arm64-cpython-310/manimpango/cmanimpango.o
clang: error: no such file or directory: 'manimpango/cmanimpango.c'
clang: error: no input files
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 manimpango
Building wheel for mapbox-earcut (pyproject.toml) ... done
Created wheel for mapbox-earcut: filename=mapbox_earcut-1.0.0-cp310-cp310-macosx_12_0_arm64.whl size=72017 sha256=49873a3124a130be03753ec4aa6d6408f4af9c234ff5433f948b1bbd3b94c7a4
Stored in directory: /Users/danielgonzalez/Library/Caches/pip/wheels/cc/7a/93/50cda63e26704e1803279d1c364c4344f37d37f67778e5c8fe
Building wheel for validators (setup.py) ... done
Created wheel for validators: filename=validators-0.20.0-py3-none-any.whl size=19579 sha256=4f2b09f52583aa064bf40f70c008ef8c4711a59b00bc046366564ab19db2ccbd
Stored in directory: /Users/danielgonzalez/Library/Caches/pip/wheels/2d/55/25/123071088f4e466746cbadc923b1a31e08cea99ea9ef6bb35e
Successfully built mapbox-earcut validators
Failed to build manimpango
ERROR: Could not build wheels for manimpango, which is required to install pyproject.toml-based projects
Additional context
I initially got an error ModuleNotFoundError: No module named 'pybind11'
while trying to build, but was able to quickly resolve it manually running python -m pip install pybind11
.
I just ran into this issue and investigated it.
Downloading thr ManimPango pip archive, there is indeed no manimpango/cmanimpango.c
file, but there is manimpango/cmanimpango.pyx
.
In manimpango's setup.py
there are the following lines:
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
and later
ext = ".pyx" if USE_CYTHON else ".c"
And indeed Cython was not installed on my system. Running
pip install cython
allowed me to install manim in the end. Why Cython is not installed automatically I am not sure. May really be something Ventura-specific that broke some assumption or so.
@lhoenig's solution worked for me!
this did not work for me on Sonoma w/ ARM, but i managed to get things installed.