manim icon indicating copy to clipboard operation
manim copied to clipboard

Error installing manim and running a test program

Open kkin1995 opened this issue 3 years ago • 6 comments

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

kkin1995 avatar Mar 21 '21 09:03 kkin1995

I have the exact same issue. I'm also using Linux Mint, and have no idea about what pangocairo is.

Liquid-Aristocracy avatar Jun 03 '21 10:06 Liquid-Aristocracy

In my M1 Mac, brew install pango can solve this problem.

zhiwayzhang avatar Dec 18 '21 11:12 zhiwayzhang

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

yuhan2680 avatar May 09 '22 09:05 yuhan2680

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.

yuhan2680 avatar May 09 '22 09:05 yuhan2680

In my M1 Mac, brew install pango can solve this problem.

This should be in the installation notes for Macs.

kortenkamp avatar Jun 09 '22 14:06 kortenkamp

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

cutebbb avatar Jun 13 '22 16:06 cutebbb