Closed YishiMichael closed 2 years ago
Hey @YishiMichael! More of a general comment than a concrete solution for your issue here:
@naveen521kk also has put some thought into refactoring Text
, not sure what the current status is but you can find a sketch of the plans at https://github.com/ManimCommunity/manim/issues/2355. To avoid further fragmentation between Grant's personal version of Manim and the community version, we should try to stick to the same version of ManimPango, meaning that all changes to the interface should also be ported to ManimCommunity/manim. We'd certainly love to have you as a contributor! :-) (And even if you prefer to stick to 3b1b/manim, I'm sure we will find a suitable way for collaborating.)
@behackl Yeah I'd like to contribute to ManimCE as well!
I've read #2355 and was pleased to see the new implementation design. I'm looking forward to collaborating with manim community, started with Text
class.
Thanks for the contribution. As @behackl mentioned it would be great if the changes you do on Grant's version related to ManimPango/Text API be ported to ManimCommunity/manim.
Also, I have been planning to refactor the Text API https://github.com/ManimCommunity/manim/issues/2355 and also have thoughts to provide a stable API here https://github.com/ManimCommunity/ManimPango/issues/28; suggestions about them welcome. I have been waiting for the refactor period (which we announced a while ago) to be done, but it seems like we won't have anything like it anytime soon; which means I would start working on it anytime soon (probably after the exams which will end by march).
Failed to open 'D:/msys64/mingw64/lib/pkgconfig\freetype2.pc': Too many open files Package 'freetype2', required by 'harfbuzz', not found
This is the error from pkg-config, which seems like just restarting your computer and re-running the install should fix it.
It doesn't work... But thanks for replying. I may try other means.
It doesn't work... But thanks for replying. I may try other means.
Maybe try running pacman -Qkq
in that shell to check whether all the files are installed correctly? Also, try running pkg-config --libs --cflags pangocairo
manually on that shell to see if it errors out in that case?
It goes into error when I run pkg-config --libs --cflags pangocairo
. The message is
$ pkg-config --libs --cflags pangocairo
Failed to open 'D:/msys64/mingw64/lib/pkgconfig\freetype2.pc': Too many open files
Package 'freetype2', required by 'harfbuzz', not found
Does the pacman command suceed? Also, does a file called D:/msys64/mingw64/lib/pkgconfig\freetype2.pc
exists?
Also, what does pkg-config --version
and which pkg-config
commands print?
The file D:/msys64/mingw64/lib/pkgconfig/freetype2.pc
exists. And here's the output:
$ pacman -Qkq
mingw-w64-x86_64-make /mingw64/bin/mingw32-make.exe
$ pkg-config --version
0.23
$ which pkg-config
/mingw64/bin/pkg-config
Hmm, I'm wondering why pkg-config is used instead of pkgconf, I remember they replaced pkgconf by default. Did you ever update the packages there ie run (pacman -Syu
)? If yes, can you run pacman -S mingw-w64-x86_64-pkgconf
and then press yes for all questions asked from Pacman. If not, please update first using pacman -Syu
, it should ask about replacement and just input yes there.
Doing so should fix the issue I think.
I've run the commands provided, i.e.
$ pacman -Syu
$ pacman -S mingw-w64-x86_64-pkgconf
I've also restarted my computer. They worked --- the error changed :( Listed here:
$ pip install -e .
Obtaining file:///E://ManimKindergarten/ManimPango
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Installing collected packages: ManimPango
Running setup.py develop for ManimPango
ERROR: Command errored out with exit status 1:
command: D:/msys64/mingw64/bin/python.exe -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'E:/ManimKindergarten/ManimPango/setup.py'"'"'; __file__='"'"'E:/ManimKindergarten/ManimPango/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
cwd: E:/ManimKindergarten/ManimPango/
Complete output (17 lines):
running develop
C:/Users/Michael/AppData/Local/Temp/pip-build-env-2qi7q51c/overlay/lib/python3.9/site-packages/setuptools/command/easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
C:/Users/Michael/AppData/Local/Temp/pip-build-env-2qi7q51c/overlay/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running egg_info
writing ManimPango.egg-info/PKG-INFO
writing dependency_links to ManimPango.egg-info/dependency_links.txt
writing top-level names to ManimPango.egg-info/top_level.txt
reading manifest file 'ManimPango.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
writing manifest file 'ManimPango.egg-info/SOURCES.txt'
running build_ext
building 'manimpango.cmanimpango' extension
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
----------------------------------------
ERROR: Command errored out with exit status 1: D:/msys64/mingw64/bin/python.exe -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'E:/ManimKindergarten/ManimPango/setup.py'"'"'; __file__='"'"'E:/ManimKindergarten/ManimPango/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Now the problem is https://www.msys2.org/news/#2021-12-21-potential-incompatibilities-with-newer-python-setuptools I should've updated the README file about it. Simply, running export SETUPTOOLS_USE_DISTUTILS=stdlib
before the pip command should work.
Many thanks for your patience!! It's finally installed successfully.
Recently I'm attempting to refactor
Text
class in manimgl, and the job requires me to clone into ManimPango and rewrite it to fit the new structure forText
. I had a problem when installing ManimPango via pip on my Windows. I followed instructions in README, and an error popped out while runningpip install -e .
, which is listed as follows:I saw another similar issue #53, but it seems that it's already fixed. So it seems wierd to me. And, installing manimgl via
pip install -e .
which relies on this dependency doesn't cause any problem. I've checked that MSYS2 MINGW64 shell was used to execute commands.Any help will be appreciated :D