Missing dependencies
kcandrews opened this issue · 8 comments
I'm really excited to try this package out. However, I'm having a hard time getting it to work. First, I discovered that it needed libpango1.0-dev installed by the operating system to even install. Then I tried to run it and it gave a warning that it also needed ffmpeg or avconv. So, I installed ffmpeg. Then I ran git-sim status and got some weird messages about jpeg mimetypes.
Error: no "view" mailcap rules found for type "image/jpeg"
A google search turned up this heavily downvoted stackoverflow question. This may be related to the following perl error message:
Use of uninitialized value $file in open at /usr/share/perl5/File/MimeInfo/Applications.pm line 140.
I also see:
Use of uninitialized value in subroutine entry at /usr/share/perl5/File/BaseDir.pm line 105.
Finally, there is a summary:
No applications found for mimetype: image/jpeg
I'm trying to run git-sim from inside a python virtual environment installed inside of Ubuntu 22.04. All of that is being access from a funky RStudio terminal running inside of a web browser. Since I've never gotten this package to work, it's not clear what I should expect. I guess I thought it would just create an animation and point me to where it got saved so I could read it with an image viewer. I think maybe the program is not yet smart enough to understand that if it's assumptions are not met, that it should just make the image/video file, write it to disk, and then tell the user the path to that file. I could be completely wrong about this, but that's what it seems like to me.
@kcandrews Thanks for the detailed description.
First question - step (1) in the quickstart guide in the readme is to "Install Manim and Manim dependencies for your OS" with a link to Manim's website. If you follow the steps there for Linux, it lists all the steps to get Manim installed on Ubuntu, (which specifically includes the stuff you say you "discovered" like libpango1.0-dev and ffmpeg among others), so sounds like you might have missed part of that step. So first of all I recommend reading thru those steps that I've pasted below and make sure you have all Manim requirements installed:
Required Dependencies
apt – Ubuntu / Mint / Debian
To first update your sources, and then install Cairo, Pango, and FFmpeg simply run:
sudo apt update
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
If you don’t have python3-pip installed, install it via:
sudo apt install python3-pip
Then, to install Manim, run:
pip3 install manim
For the second part, you make a good point. You're correct that by default the program tries to open up the generated image/video with the default editor, and might throw some unhandled warning or error messages if it can't find one.
I can definitely try to clean up that situation and print an output location in the terminal, but know that by default the media directory is just new folder within your Git repo called git-sim_media which you can find the generated jpg / mp4 output at. You can also use our newly implemented environment variable (as seen here in the readme) to set a global location for the output if you don't want anything created within your Git repo.
Can you first just check in the default media directory and let me know if the images are being created?
If not, you can try disabling the automatic image opening step using the global option --disable-auto-open (or -d for short), like this:
$ git-sim -d status
After that you should be able to find the image in the media directory, but I do like your idea of the program also printing out the location of the file, to make it 100% obvious where to find it.
Let me know if you're able to get it working and if you run into any other issues!
re: the Manim installation instructions:
Maybe we can update the link in the READMEto point directly to the "Installation" section of the Manim docs, instead of the project homepage?
-> https://docs.manim.community/en/stable/installation.html
PR: #35
@initialcommit-io I installed directly from PyPI instead of using a git repository, so I'm not sure where to look for this media folder you mentioned would be. I tried looking under the virtualenv with find . -iname '*sim_media' but it did not return anything.
@kcandrews It would only be created if you are able to at least execute one successful Git-Sim command, which would create the git-sim_media/ directory inside your Git repo.
Please try the following steps and let me know the result:
cdinto any git repo on your machine- run
git-sim -d status - run
lsto see if thegit-sim_mediawas created. If so, the output image should be created ingit-sim_media/images/folder - If that doesn't work, please just try running
git-sim -hwhich should show the help, but if you get an error please copy/paste it here so we can see
That makes sense to me now. My mind fought me a bit, so I did not immediately make the connection that the git repository it was going to write the data to was the git repository the command was run in. The latest file is there as well as the other file from a few hours ago from the time I did not know about the -d flag.
Cool sounds good! I will keep this open until later today when I add your suggestion to print message that tells the user exactly where the image or video was saved :D.
This tool is in active dev so if you want to take advantage of git-sim updates over time make sure to run once in a while:
$ pip install git-sim --upgrade
@kcandrews Just implemented the printing of the output file location in git-sim 0.1.7.
Please upgrade to git-sim 0.1.7 by running:
$ pip install git-sim --upgrade
Then test it out and let me know if it works for you! =D
@kcandrews Closing since this should be resolved now. Feel free to reopen if any issues.