manim
manim copied to clipboard
Error installing manim and running a test program
Describe the error
I installed ffmpeg from the APT package manager and PyOpenGL from pip3 in a virtual environment. Then, when I tried to install manim in the same virtual environment it gave the following error
However, in the end, it said that it successfully installed manim and its dependencies.
Then, I tried to run a simple program to see if it works:
But, it just keeps running with no errors (like it is frozen).
Code and Error
Code:
class SquareImage(Scene):
def construct(self):
square = Square()
self.add(square)
manimgl manim_test.py SquareImage -s
Error:
ERROR: Command errored out with exit status 1:
command: /home/karan/manim/venv/bin/python /home/karan/manim/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp8troxa62
cwd: /tmp/pip-install-vtkpor5m/manimpango_d759c30457a744afbb343d792b24d300
Complete output (33 lines):
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found
Traceback (most recent call last):
File "setup.py", line 124, in check_min_version
check_call(command, stdout=subprocess.DEVNULL)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pkg-config', '--print-errors', '--atleast-version', '1.30.0', 'pangocairo']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/karan/manim/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/karan/manim/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/karan/manim/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-vytjtzxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 149, in get_requires_for_build_wheel
return self._get_build_requires(
File "/tmp/pip-build-env-vytjtzxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-vytjtzxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 253, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-vytjtzxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 190, in <module>
_pkg_config.check_min_version(MINIMUM_PANGO_VERSION)
File "setup.py", line 127, in check_min_version
raise RequiredDependencyException(f"{self.name} >= {version} is required")
__main__.RequiredDependencyException: pangocairo >= 1.30.0 is required
----------------------------------------
Environment
OS System: Linux Mint manim version: master python version: 3.8.5
I have the exact same issue. I'm also using Linux Mint, and have no idea about what pangocairo
is.
In my M1 Mac, brew install pango
can solve this problem.
You can check your LaTex and FFmpeg .And the python edition should between 3.7 to 3.9 .Most of the problem is from here .
Here is some website for you to check: https://docs.manim.community/en/stable/installation.html https://docs.manim.org.cn/getting_started/installation.html http://3b1b.github.io/manim/getting_started/installation.html
I have the exact same issue. I'm also using Linux Mint, and have no idea about what
pangocairo
is.
Linux system also needs to install Pango .Please check has your installed Pango.
In my M1 Mac,
brew install pango
can solve this problem.
This should be in the installation notes for Macs.
https://docs.manim.community/en/stable/installation/linux.html#required-dependencies
Run sudo apt install libcairo2-dev libpango1.0-dev ffmpeg
before the pip3 install manimgl
.
OS: ubuntu20.04