Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed building wheel for manimpango #92

Closed
Makon3 opened this issue Sep 4, 2022 · 16 comments
Closed

Failed building wheel for manimpango #92

Makon3 opened this issue Sep 4, 2022 · 16 comments

Comments

@Makon3
Copy link

Makon3 commented Sep 4, 2022

Have an M1 mac, tried to install manim, but after typing pip3 install manim I get:

  Collecting manim
  Using cached manim-0.16.0.post0-py3-none-any.whl (528 kB)
Collecting manimpango<0.5.0,>=0.4.0.post0
  Using cached ManimPango-0.4.1.tar.gz (4.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: scipy<2.0.0,>=1.7.3 in /opt/homebrew/lib/python3.10/site-packages (from manim) (1.9.1)
Collecting Pygments<3.0.0,>=2.10.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting click-default-group<2.0.0,>=1.2.2
  Using cached click_default_group-1.2.2-py3-none-any.whl
Collecting colour<0.2.0,>=0.1.5
  Using cached colour-0.1.5-py2.py3-none-any.whl (23 kB)
Collecting Pillow<10.0,>=9.1
  Using cached Pillow-9.2.0-cp310-cp310-macosx_11_0_arm64.whl (2.8 MB)
Requirement already satisfied: numpy<2.0,>=1.19 in /opt/homebrew/lib/python3.10/site-packages (from manim) (1.23.2)
Collecting click>=7.2
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting srt<4.0.0,>=3.5.0
  Using cached srt-3.5.2-py3-none-any.whl
Collecting pydub<0.26.0,>=0.25.1
  Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting tqdm<5.0.0,>=4.62.3
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting isosurfaces==0.1.0
  Using cached isosurfaces-0.1.0-py3-none-any.whl (10 kB)
Collecting mapbox-earcut<0.13.0,>=0.12.10
  Using cached mapbox_earcut-0.12.11-cp310-cp310-macosx_12_0_arm64.whl
Collecting moderngl<6.0.0,>=5.6.3
  Using cached moderngl-5.6.4-cp310-cp310-macosx_10_9_universal2.whl (234 kB)
Collecting cloup<0.14.0,>=0.13.0
  Using cached cloup-0.13.1-py2.py3-none-any.whl (51 kB)
Collecting watchdog<3.0.0,>=2.1.6
  Using cached watchdog-2.1.9-cp310-cp310-macosx_11_0_arm64.whl (88 kB)
Collecting decorator<6.0.0,>=5.0.7
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting rich!=12.0.0,>=6.0
  Using cached rich-12.5.1-py3-none-any.whl (235 kB)
Collecting requests<3.0.0,>=2.26.0
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting networkx<3.0,>=2.5
  Using cached networkx-2.8.6-py3-none-any.whl (2.0 MB)
Requirement already satisfied: pycairo<2.0,>=1.19 in /opt/homebrew/lib/python3.10/site-packages (from manim) (1.21.0)
Collecting skia-pathops<0.8.0,>=0.7.0
  Using cached skia_pathops-0.7.2-cp310-cp310-macosx_10_9_universal2.whl (2.9 MB)
Collecting screeninfo<0.9,>=0.8
  Using cached screeninfo-0.8-py3-none-any.whl (14 kB)
Collecting moderngl-window<3.0.0,>=2.3.0
  Using cached moderngl_window-2.4.1-py3-none-any.whl (365 kB)
Collecting glcontext<3,>=2
  Using cached glcontext-2.3.6-cp310-cp310-macosx_10_9_universal2.whl (12 kB)
Collecting pyrr<1,>=0.10.3
  Using cached pyrr-0.10.3-py3-none-any.whl (46 kB)
Collecting pyglet<2,>=1.5.8
  Using cached pyglet-1.5.26-py3-none-any.whl (1.1 MB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.6.15-py3-none-any.whl (160 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting Cython
  Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting pyobjc-framework-Cocoa
  Using cached pyobjc_framework_Cocoa-8.5-cp310-cp310-macosx_10_9_universal2.whl (388 kB)
Collecting multipledispatch
  Using cached multipledispatch-0.6.0-py3-none-any.whl (11 kB)
Collecting pyobjc-core>=8.5
  Using cached pyobjc_core-8.5-cp310-cp310-macosx_10_9_universal2.whl (578 kB)
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
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
  ╰─> [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.1.0/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/glib/2.72.3_1/include -I/opt/homebrew/Cellar/fribidi/1.0.12/include/fribidi -I/opt/homebrew/Cellar/harfbuzz/5.1.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.72.3_1/include -I/opt/homebrew/Cellar/glib/2.72.3_1/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.72.3_1/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre/8.45/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.37/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/MacOSX12.sdk/usr/include/ffi -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/harfbuzz/5.1.0/include/harfbuzz -I/opt/homebrew/Cellar/pango/1.50.9/include/pango-1.0 -I/opt/homebrew/Cellar/glib/2.72.3_1/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.37/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.72.3_1/include -I/opt/homebrew/Cellar/harfbuzz/5.1.0/include/harfbuzz -I/opt/homebrew/Cellar/graphite2/1.3.14/include -I/opt/homebrew/Cellar/glib/2.72.3_1/include/glib-2.0 -I/opt/homebrew/Cellar/glib/2.72.3_1/lib/glib-2.0/include -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/Cellar/pcre/8.45/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/MacOSX12.sdk/usr/include/ffi -I/opt/homebrew/Cellar/python@3.10/3.10.6_2/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
Failed to build manimpango
ERROR: Could not build wheels for manimpango, which is required to install pyproject.toml-based projects

I tried to solve the problem by running brew install pango pkg-config as was said on this website:
https://github.com/ManimCommunity/manimpango#linuxmacos

But, after doing that it still gave the same error when I typed pip3 install manim

Can you please help me?

@naveen521kk
Copy link
Member

naveen521kk commented Sep 4, 2022

Not sure why Cython didn't automatically create manimpango/cmanimpango.c. Maybe Cython isn't installed and something didn't work? From your logs, I see a

Error in sitecustomize; set PYTHONVERBOSE for traceback:
AssertionError:

which is weird. Can you set PYTHONVERBOSE (that's an environment variable) and attach the output (note it'll be really long). Also, how did you install python and what does python --version --version print?

@Makon3
Copy link
Author

Makon3 commented Sep 4, 2022

Not sure why Cython didn't automatically create manimpango/cmanimpango.c. Maybe Cython isn't installed and something didn't work? From your logs, I see a

Error in sitecustomize; set PYTHONVERBOSE for traceback:
AssertionError:

which is weird. Can you set PYTHONVERBOSE (that's an environment variable) and attach the output (note it'll be really long). Also, how did you install python and what does python --version --version print?

Really sorry, but how do I do that?

Can you set PYTHONVERBOSE (that's an environment variable) and attach the output (note it'll be really long)

I just went to python website (https://www.python.org/downloads/) and installed the latest version.

python --version --version prints zsh: command not found: python while python3 --version --version prints Python 3.10.6 (main, Aug 30 2022, 04:58:14) [Clang 13.1.6 (clang-1316.0.21.2.5)]

You were right, Cython wasn't installed, so I ran brew install Cython but it still didn't solve the problem.

@naveen521kk
Copy link
Member

Really sorry, but how do I do that?

Run export PYTHONVERBOSE=1 first, then run pip and attach its output to a file here.

You were right, Cython wasn't installed, so I ran brew install Cython but it still didn't solve the problem.

It should be automatically installed using pip...

@Makon3
Copy link
Author

Makon3 commented Sep 4, 2022

After running export PYTHONVERBOSE=1 and then pip3 install manim I got:
github.pdf

After running export PYTHONVERBOSE=1 and then pip3 I got:
github 2.pdf

@naveen521kk
Copy link
Member

I think that AssertionError is not related to this one.

I'm not sure why Cython is not available in the environment pip creates. I think installing it using the classic setup.py install would work for now, follow the steps below:

  1. Dowload and extract https://github.com/ManimCommunity/ManimPango/releases/download/v0.4.1/ManimPango-0.4.1.tar.gz to a directory and open a terminal there
  2. Make sure setup.py is available in the same directory as the terminal currently is.
  3. Install build deps: pip3 install -U setuptools Cython wheel
  4. Install: python3 setup.py install

This should install ManimPango and stuff should work, but this isn't really the "correct" way to install but it should work.

@ad-chaos
Copy link

ad-chaos commented Sep 4, 2022

Also can you join the discord? Easier to talk and settle things there and then we can come here and update it for future reference and googleability..

@Makon3
Copy link
Author

Makon3 commented Sep 4, 2022

I think that AssertionError is not related to this one.

I'm not sure why Cython is not available in the environment pip creates. I think installing it using the classic setup.py install would work for now, follow the steps below:

  1. Dowload and extract https://github.com/ManimCommunity/ManimPango/releases/download/v0.4.1/ManimPango-0.4.1.tar.gz to a directory and open a terminal there
  2. Make sure setup.py is available in the same directory as the terminal currently is.
  3. Install build deps: pip3 install -U setuptools Cython wheel
  4. Install: python3 setup.py install

This should install ManimPango and stuff should work, but this isn't really the "correct" way to install but it should work.

It worked, thank you so much!

@naveen521kk
Copy link
Member

It worked, thank you so much!

Great, I'll close this issue then.

@markshep
Copy link

markshep commented Feb 7, 2023

I just hit this problem too, again on an M1 Mac with Homebrew python on it. I ran pip3 install git-sim and manimpango is a dependency of that. However I managed to fix the problem by upgrading pip by running the suggested command at the end of the output:

[notice] A new release of pip available: 22.3.1 -> 23.0
[notice] To update, run: python3.10 -m pip install --upgrade pip

@kafka-tamura
Copy link

I am running into the same problem on my M1 Mac. Tried @markshep's and @naveen521kk's recommendation. No dice. For me, it says that it can't find "cairo.h". Cairo and Py3cairo are both installed. Any thoughts?

@ad-chaos
Copy link

export CPATH=/opt/homebrew/include/
export LIBRARY_PATH=/opt/homebrew/lib/

try installing manim after exporting those env-vars

@kafka-tamura
Copy link

The issue with with pkg-config. It was failing and not passing the params accurately. The setup assumes when pkg-config fails that library variables are provided and hence couldn't locate cairo. Relinked pkg-config and installation worked fine. Thanks!

@ad-chaos
Copy link

What do you mean by relinked?

@kafka-tamura
Copy link

brew unlink pkg-config && brew link pkg-config

@ad-chaos
Copy link

That operation doesn't do anything meaningful. Did you do that after exporting those environment variables?

@kafka-tamura
Copy link

kafka-tamura commented Sep 18, 2023

No, I did not export any variables. TBH, I wanted to do that initially, but was unable to figure the right env variables. Linking/ relinking was a hail Mary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants