krassowski / jupyter-manim

manim cell magic for IPython/Jupyter to show the output video
MIT License
192 stars 11 forks source link

binder build for jupyter-manim #27

Open emonhossainraihan opened 3 years ago

emonhossainraihan commented 3 years ago

I was trying to create a binder build for jupyter-manim. I was expecting to execute all custom animation which I create with 3b1b/manim. As it need a lot of installation (for me, I was unable to set up manim in my Ubuntu 20.04), I was thinking to use binder as an alternative. But I got the following error when I use %%manim CustomAnimation:

/home/jovyan/jupyter_manim/__init__.py:302: UserWarning: Could not find path in the manim output
  warn('Could not find path in the manim output')
/tmp/tmpb6smavun.py:39: UserWarning: Import from notebook: name already in the globals(), skipping
  warn('Import from notebook: ' + name + ' already in the globals(), skipping')
Traceback (most recent call last):
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/manimlib/extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/manimlib/scene/scene.py", line 75, in __init__
    self.construct()
  File "/tmp/tmpb6smavun.py", line 94, in construct
    title = TextMobject("Simpsons Rule").scale(2)
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/manimlib/mobject/svg/tex_mobject.py", line 148, in __init__
    self, self.arg_separator.join(tex_strings), **kwargs
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/manimlib/mobject/svg/tex_mobject.py", line 44, in __init__
    self.template_tex_file_body
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/manimlib/utils/tex_file_writing.py", line 21, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/manimlib/utils/tex_file_writing.py", line 72, in tex_to_dvi
    "See log output above or the log file: %s" % log_file)
Exception: Latex error converting to dvi. See log output above or the log file: /home/jovyan/media/Tex/fa57ceb432d6961f.log

Is there any way to build this as ManimCommunity has one. I have some discussion on this on Reddit

krassowski commented 3 years ago

It might be useful indeed. The error you got just tells you that you have not installed appropriate latex packages on binder.