ManimCommunity / ManimPango

Binding for Pango, to use with Manim.
https://manimpango.manim.community
MIT License
43 stars 13 forks source link

manimpango ImportError after latest update #15

Closed k4pran closed 3 years ago

k4pran commented 3 years ago

Description of bug / unexpected behavior

I pulled from latest master today and began getting import issues when importing manimpango - "Couldn't load the necessary Shared Libraries." in manimpango's init.py.

Expected behavior

Run the manim scene, but importing fails

How to reproduce the issue

Code for reproducing the problem ```py class GraphAreaPlot(GraphScene): def __init__(self, **kwargs): GraphScene.__init__( self, x_min=0, x_max=5, y_min=0, y_max=6, x_labeled_nums=[0,2,3], **kwargs) def construct(self): self.setup_axes() curve1 = self.get_graph(lambda x: 4 * x - x ** 2, x_min=0, x_max=4) curve2 = self.get_graph(lambda x: 0.8 * x ** 2 - 3 * x + 4, x_min=0, x_max=4) line1 = self.get_vertical_line_to_graph(2, curve1, DashedLine, color=YELLOW) line2 = self.get_vertical_line_to_graph(3, curve1, DashedLine, color=YELLOW) area1 = self.get_area(curve1, 0.3, 0.6, dx_scaling=10, area_color=BLUE) area2 = self.get_area(curve2, 2, 3, bounded=curve1) self.add(curve1, curve2, line1, line2, area1, area2) ```

Logs

Terminal output ``` Traceback (most recent call last): File "/Users/ryan/PycharmProjects/manim-community/venv/lib/python3.7/site-packages/manimpango/__init__.py", line 11, in from .cmanimpango import * # noqa: F403,F401 ImportError: dlopen(/Users/ryan/PycharmProjects/manim-community/venv/lib/python3.7/site-packages/manimpango/cmanimpango.cpython-37m-darwin.so, 2): Symbol not found: ____chkstk_darwin Referenced from: /Users/ryan/PycharmProjects/manim-community/venv/lib/python3.7/site-packages/manimpango/.dylibs/libfreetype.6.dylib (which was built for Mac OS X 10.15) Expected in: /usr/lib/libSystem.B.dylib in /Users/ryan/PycharmProjects/manim-community/venv/lib/python3.7/site-packages/manimpango/.dylibs/libfreetype.6.dylib During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/ryan/PycharmProjects/manim-community/manim/__main__.py", line 5, in from manim import logger, config File "/Users/ryan/PycharmProjects/manim-community/manim/__init__.py", line 47, in from .mobject.svg.text_mobject import * File "/Users/ryan/PycharmProjects/manim-community/manim/mobject/svg/text_mobject.py", line 56, in import manimpango File "/Users/ryan/PycharmProjects/manim-community/venv/lib/python3.7/site-packages/manimpango/__init__.py", line 13, in raise ImportError("Couldn't load the necessary Shared Libraries.") ImportError: Couldn't load the necessary Shared Libraries. ```

System specifications

System Details - OS macOS 10.13.6 (High Sierra)): - RAM: 8 GB - Python version: 3.7 - Installed modules : ``` arrow 0.17.0 attrs 20.3.0 cairocffi 1.2.0 cffi 1.14.4 colorama 0.4.4 colour 0.1.5 commonmark 0.9.1 decorator 4.4.2 importlib-metadata 3.1.0 iniconfig 1.1.1 Jinja2 2.11.2 jinja2-time 0.2.0 make 0.1.6.post2 manim 0.2.0 manimce 0.1.0 manimpango 0.1.7 MarkupSafe 1.1.1 networkx 2.5 numpy 1.19.4 packaging 20.7 pangocairocffi 0.4.0 pangocffi 0.8.0 Pillow 8.0.1 pip 20.3.3 pluggy 0.13.1 progressbar 2.5 py 1.9.0 pycairo 1.20.0 pycparser 2.20 pydub 0.24.1 Pygments 2.7.2 pyparsing 2.4.7 pytest 6.1.2 python-dateutil 2.8.1 rich 6.2.0 scipy 1.5.4 setuptools 50.3.2 six 1.15.0 toml 0.10.2 tqdm 4.54.0 typing-extensions 3.7.4.3 zipp 3.4.0 ```
LaTeX details + LaTeX distribution (e.g. TeX Live 2020): + Installed LaTeX packages:
FFMPEG Output of `ffmpeg -version`: ``` ffmpeg version 4.3.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.17) configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 ```

Additional comments

If it is just a case of an unsupported mac version I can upgrade, just wanted to see if it could be anything else.

naveen521kk commented 3 years ago

Usually ManimPango should work out of the box, but don't know why it doesn't here. Try following https://github.com/manimcommunity/manimpango#linuxmacos and see if things work. Also, please open issue in the corresponding repository and not here, transferring.

k4pran commented 3 years ago

Usually ManimPango should work out of the box, but don't know why it doesn't here. Try following https://github.com/manimcommunity/manimpango#linuxmacos and see if things work. Also, please open issue in the corresponding repository and not here, transferring.

Thank you, yes I had already followed these steps, all the dependencies seem to be installed, I used brew to install these.

naveen521kk commented 3 years ago

Thank you, yes I had already followed these steps, all the dependencies seem to be installed, I used brew to install these.

Ok, does ManimPango install correctly?

k4pran commented 3 years ago

Thank you, yes I had already followed these steps, all the dependencies seem to be installed, I used brew to install these.

Ok, does ManimPango install correctly?

Yes there were no issues installing it

naveen521kk commented 3 years ago

:+1: Closing this issue as this is fixed.

k4pran commented 3 years ago

👍 Closing this issue as this is fixed.

Sorry I think you misunderstood, it installs correctly, but does not import correctly when I run manim

naveen521kk commented 3 years ago

Sorry I think you misunderstood, it installs correctly, but does not import correctly when I run manim

Did you try no binary version? Possibly add a --force so that it overrides the previously installed one

pip install manimpango --no-binary :all: --force

Send the logs after running.

k4pran commented 3 years ago
pip install manimpango --no-binary :all: --force

That has worked! Thank you very much for your' help