Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I ran it in Colab? #10

Closed
qo4on opened this issue Feb 8, 2020 · 8 comments
Closed

Can I ran it in Colab? #10

qo4on opened this issue Feb 8, 2020 · 8 comments

Comments

@qo4on
Copy link

qo4on commented Feb 8, 2020

I have a bunch of errors with this:
!pip3 install jupyter-manim

@krassowski
Copy link
Owner

Previously users have run it in Colab, so you should be fine. Please paste the errors that you see - otherwise this would is a guessing game.

@krassowski
Copy link
Owner

Seems resolved based on #2 (comment)... @qo4on, if you open a bunch of issues in different repositories without providing the details, it may frustrate the maintainers. Please mind our time - no one pays us for this.

Also, if you have already found a solution for your problem, please post it in the issues/close them, so that others can benefit. This is all about helping each other. You are very welcome here, but please do help us help you.

Cross-referencing:

@qo4on
Copy link
Author

qo4on commented Feb 8, 2020

I did this thing in Colab:

!rm -rf sample_data
!sudo apt-get -qq install texlive-full
!sudo apt-get -qq install ffmpeg
!sudo apt-get -qq install sox
!sudo apt-get -qq install libcairo2-dev libjpeg-dev libgif-dev python3-dev libffi-dev
!python3 -m pip install -q pyreadline
!python3 -m pip install -q pydub
!git clone -q https://github.com/3b1b/manim.git > /dev/null
%cd manim
!python3 -m pip install -qr requirements.txt

It took awhile. After that it seems to work fine and the code below generates a video:
!python3 -m manim example_scenes.py SquareToCircle -pl

Then I did this:
!pip3 install jupyter-manim
with some errors:

ERROR: manimlib 0.1.10 has requirement numpy==1.15.0, but you'll have numpy 1.16.4 which is incompatible.
ERROR: manimlib 0.1.10 has requirement scipy==1.1.0, but you'll have scipy 1.3.0 which is incompatible.
ERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.
ERROR: albumentations 0.1.12 has requirement imgaug<0.2.7,>=0.2.5, but you'll have imgaug 0.2.9 which is incompatible.
ERROR: tensorflow 1.15.0 has requirement numpy<2.0,>=1.16.0, but you'll have numpy 1.15.0 which is incompatible.
ERROR: plotnine 0.6.0 has requirement numpy>=1.16.0, but you'll have numpy 1.15.0 which is incompatible.
ERROR: plotnine 0.6.0 has requirement scipy>=1.2.0, but you'll have scipy 1.1.0 which is incompatible.
ERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.
ERROR: astropy 4.0 has requirement numpy>=1.16, but you'll have numpy 1.15.0 which is incompatible.
ERROR: albumentations 0.1.12 has requirement imgaug<0.2.7,>=0.2.5, but you'll have imgaug 0.2.9 which is incompatible.

And Colab asks to restart environment.
Finally I managed to get it work. The code below showed a video inside the notebook.

import jupyter_manim

%%manim Shapes --base64
from manimlib.scene.scene import Scene
from manimlib.mobject.geometry import Circle
from manimlib.animation.creation import ShowCreation

class Shapes(Scene):

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

Is that ok, can I safely ignore these errors?

@krassowski
Copy link
Owner

Thank you! I cannot tell for certain, but these mostly seem as minor version bumps, you may be fine - and as you said it's working.

This errors/warnings steam from the fact that you installed a development version of manim from GitHub, rather than the one available via pip3. Was this your choice, or was it that the pip version did not work?

@qo4on
Copy link
Author

qo4on commented Feb 8, 2020

I did not succeed with pip3, but maybe I did something wrong there. I spent a couple of hours looking for right commands. I think it's worth putting Colab example in the installation guide.

@qo4on
Copy link
Author

qo4on commented Feb 8, 2020

  • Some features doesn't work: I noticed that full screen button is gray, can't turn on.

  • Is it possible to change fps to 15 for preview? Changing resolution -r 480,854 works perfectly.

@krassowski
Copy link
Owner

  • I think that the full-screen button is a browser-dependent thing.
  • most (but not all) of the standard parameters/toggles of the manim should work. Get a full list of those with
%%manim -h
pass

For example, the online example uses --low_quality to render faster.

@qo4on
Copy link
Author

qo4on commented Feb 8, 2020

Thank you!

  • I'm not sure if it's the browser's fault. I have latest Chrome 79.0.3945.130 (Official Build) (64-bit) (cohort: Stable).

  • There's no framerate in help. I'm a new to Manim, need to delve deeper in it.

@qo4on qo4on closed this as completed Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants