ManimCommunity / ManimPango

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

Tests fail to run from PyTest: ManimPango could not import and load the necessary shared libraries. #99

Closed yurivict closed 2 weeks ago

yurivict commented 1 year ago
[yuri@yv /usr/ports/graphics/py-ManimPango/work-py39/ManimPango-0.4.3/tests]$ pytest .
ImportError while loading conftest '/usr/ports/graphics/py-ManimPango/work-py39/ManimPango-0.4.3/tests/conftest.py'.
conftest.py:7: in <module>
    import manimpango
../manimpango/__init__.py:35: in <module>
    raise ImportError(msg)
E   ImportError:
E
E   ManimPango could not import and load the necessary shared libraries.
E   This error may occur when ManimPango and its dependencies are improperly set up.
E   Please make sure the following versions are what you expect:
E
E       * ManimPango v0.4.3, Python v3.9.16
E
E   If you believe there is a greater problem,
E   feel free to contact us or create an issue on GitHub:
E
E       * Discord: https://www.manim.community/discord/
E       * GitHub: https://github.com/ManimCommunity/ManimPango/issues
E
E   Original error: No module named 'manimpango.cmanimpango'

However, 'import manimpango' succeeds in the Python interpreter.

ManimPango-0.4.3 Python-3.9 FreeBSD 13.1

naveen521kk commented 1 year ago

I guess you've been trying to test without building the actual extension or the source tree is in PYTHONPATH. If it's the first case then build the extension first or if it's the latter then build the extension in place (python setup.py build_ext -i). If you want to test the installed version of the library then try removing the source tree location from PYTHONPATH.

HTH

yurivict commented 11 months ago

The source tree isn't in PYTHONPATH. The build is performed using PEP517 compliant tools.

3 binary extensions. cmanimpango, enums, register_font, are built.

What is wrong?

naveen521kk commented 11 months ago

Not sure what's happening in that case, sorry.

naveen521kk commented 3 weeks ago

Can you check whether do you face the issue with latest version?