Installation
Requirements
- Python 3.6+
pygraphviz
pandas
manim
:yacv
should theoretically work with both manim versions ( ManimGL or ManimCE ) but ManimCE is recommended
Issues with pycairo
? Check this
To install yacv
, clone the yacv
repository on GitHub to your local machine and then install using pip
$ git clone https://github.com/ashutoshbsathe/yacv
$ cd yacv
$ pip install -e .
Notes for Ubuntu WSL
Credit: [Yashodhan Kadam]
These instructions are for Ubuntu 20.04 WSL :
- Installing
manim
dependencies: (Note thattexlive-full
may need upwards of 5.5GB of free space)$ sudo apt-get install python3-pip python3-cairo-dev libsdl-pango-dev ffmpeg texlive-full $ pip3 install pycairo
- Installing
graphviz
:$ sudo apt-get install libgraphviz-dev graphviz-dev python3-pygraphviz python3-pygraphviz-dbg
Install yacv
normally as mentioned but replace the command pip
to pip3
If you get an error saying yacv: command not found
then you will need to manually add the path to installed library in your Ubuntu PATH environment variable. By default, yacv
is installed in /home/<your username>/.local/bin
. You can add this into the PATH by following command
$ export PATH=$PATH:/home/<your username>/.local/bin
Using yacv
yacv
needs a path to config file to work properly. To verify the installation, while in the directory where you cloned the yacv
repo, run the following:
$ yacv example_config.yml
This should start visualizing LL(1) parsing for a very simple LL(1) grammar
If everything run successfully, you should see a new folder named yacv_ll1-simple/
in your directory. Explore this folder to examine the output
To use yacv
with your own grammar and string, simply write down your grammar rules in a text file and use that to create a new config for yacv
. Then you can pass path to this config to yacv
to get your visualizations
Also check out examples/
directory for more such example configs