manim icon indicating copy to clipboard operation
manim copied to clipboard

does not work on Linux Ubuntu 22.04

Open thenik opened this issue 2 years ago • 3 comments

pip install manim does not work on Linux Ubuntu 22.04

image

`Building wheels for collected packages: manimpango Building wheel for manimpango (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for manimpango (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [34 lines of output] setup.py:98: RuntimeWarning: pkg-config doesn't exists or doesn't seem to work We assume that you give the compiler flags using corresponding environment variables. warnings.warn( setup.py:98: RuntimeWarning: pkg-config doesn't exists or doesn't seem to work We assume that you give the compiler flags using corresponding environment variables. warnings.warn( running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.10 creating build/lib.linux-x86_64-3.10/manimpango copying manimpango/_version.py -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/init.py -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/utils.py -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/glib.pxd -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/register_font.pxd -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/cmanimpango.pxd -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/pango.pxd -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/cairo.pxd -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/register_font.pyx -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/cmanimpango.pyx -> build/lib.linux-x86_64-3.10/manimpango copying manimpango/enums.pyx -> build/lib.linux-x86_64-3.10/manimpango running build_ext creating build/temp.linux-x86_64-3.10 creating build/temp.linux-x86_64-3.10/manimpango x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.10 -c manimpango/cmanimpango.c -o build/temp.linux-x86_64-3.10/manimpango/cmanimpango.o manimpango/cmanimpango.c:771:10: fatal error: cairo.h: No such file or directory 771 | #include "cairo.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. ERROR: Failed building wheel for manimpango Failed to build manimpango ERROR: Could not build wheels for manimpango, which is required to install pyproject.toml-based projects `

thenik avatar Jul 03 '23 11:07 thenik

Need libcairo2-dev package, see file list https://packages.ubuntu.com/jammy/amd64/libcairo2-dev/filelist

Biswa96 avatar Jul 06 '23 06:07 Biswa96

Installing Pycairo requires pkg-config and cairo including its headers. Here are some examples on how to install those for some platforms:

  • Ubuntu/Debian: sudo apt install libcairo2-dev pkg-config python3-dev
  • macOS/Homebrew: brew install cairo pkg-config
  • Arch Linux: sudo pacman -S cairo pkgconf
  • Fedora: sudo dnf install cairo-devel pkg-config python3-devel
  • openSUSE: sudo zypper install cairo-devel pkg-config python3-devel

Source: https://pycairo.readthedocs.io/en/latest/getting_started.html Found in: https://stackoverflow.com/questions/72892155/error-installig-pycairo-on-linux-missing-cairo-h

mikolajlubiak avatar Aug 19 '23 08:08 mikolajlubiak

Installing Pycairo requires pkg-config and cairo including its headers. Here are some examples on how to install those for some platforms:

  • Ubuntu/Debian: sudo apt install libcairo2-dev pkg-config python3-dev
  • macOS/Homebrew: brew install cairo pkg-config
  • Arch Linux: sudo pacman -S cairo pkgconf
  • Fedora: sudo dnf install cairo-devel pkg-config python3-devel
  • openSUSE: sudo zypper install cairo-devel pkg-config python3-devel

Source: https://pycairo.readthedocs.io/en/latest/getting_started.html Found in: https://stackoverflow.com/questions/72892155/error-installig-pycairo-on-linux-missing-cairo-h

using sudo apt install libcairo2-dev pkg-config python3-dev libpango1.0-dev worked for me

Marcus-Forte avatar Jan 21 '24 19:01 Marcus-Forte