0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M2macでmanimがインストールできない

Posted at

M2Macのvenv上で以下のエラーに遭遇

...
manimpango.c:773:10: fatal error: 'cairo.h' file not found
      #include "cairo.h"
               ^~~~~~~~~
      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 manimpango
  Building wheel for pycairo (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pycairo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13-arm64-cpython-311
      creating build/lib.macosx-13-arm64-cpython-311/cairo
      copying cairo/__init__.py -> build/lib.macosx-13-arm64-cpython-311/cairo
      copying cairo/__init__.pyi -> build/lib.macosx-13-arm64-cpython-311/cairo
      copying cairo/py.typed -> build/lib.macosx-13-arm64-cpython-311/cairo
      running build_ext
      'pkg-config' not found.
      Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycairo
Failed to build manimpango pycairo
ERROR: Could not build wheels for manimpango, pycairo, which is required to install pyproject.toml-based projects

解決法

1.まず以下の公式のRequirementをインストールしたか確認

2.以下のページで言われてることをやったが、解決しなかった。

この間に
brew install Cython
を実行

3.pkg-configをインストール。

最初のエラーをよく見ると 'pkg-config' not found.とある。
よって
brew install pkg-config
を実行したのちに
pip install manimを行ったらうまくインストールできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?