krassowski / jupyter-manim

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

Cannot play video on Colab #18

Closed phatsp closed 4 years ago

phatsp commented 4 years ago

Hi, I try runing your git on colab. Then it shows this error. Can you show me how to fix it. This is what I have on colab

###### cloning manim repo #######
!git clone https://github.com/3b1b/manim.git

###### installing requirements #####
%cd manim
#for fixing pycairo installing error: failed building wheel
!sudo apt install libcairo2-dev pkg-config python3-dev 
!pip3 install -r requirements.txt 

##### installing jupyter_manim #####
!pip3 install jupyter-manim

import jupyter_manim

%%manim Shapes --low_quality

from manimlib.imports import *

class Shapes(Scene):

    def construct(self):
        circle = Circle()
        self.play(ShowCreation(circle))

image

phatsp commented 4 years ago

fix with adding --base64 . I think it is because I play on Mozilla Firefox which doesn't support mp4 file. Btw, my bad for not carefully reading the documentation.

%%manim Shapes --low_quality --base64 instead of %%manim Shapes --low_quality