Skip to main content

Prerequisites

Recursion Tree Visualiser has two main dependencies:
  1. Graphviz - A system-level graph visualization library
  2. Python packages - pydot and imageio (installed automatically)
You must install Graphviz first before installing the Python package.

Install graphviz

1

Install graphviz for your platform

sudo apt install graphviz
2

Verify graphviz installation

Test that graphviz is correctly installed and in your PATH:
dot -V
You should see output like:
dot - graphviz version 2.43.0 (0)

Install recursion-visualiser

1

Install from PyPI

The easiest way to install the package is from PyPI:
pip install recursion-visualiser
This will automatically install the required Python dependencies:
  • pydot - Python interface to Graphviz’s Dot language
  • imageio - Library for reading and writing image data (used for GIF creation)
2

Verify installation

Test that the package is correctly installed:
from visualiser.visualiser import Visualiser as vs
print("Installation successful!")

Alternative installation methods

Install from source

If you want to use the latest development version or contribute to the project:
git clone https://github.com/Bishalsarang/Recursion-Tree-Visualizer.git
cd Recursion-Tree-Visualizer
pip install -r requirements.txt

Docker installation

If you have Docker and docker-compose installed, you can run recursion-visualiser in a containerized environment:
1

Download Docker files

curl https://raw.githubusercontent.com/Bishalsarang/Recursion-Tree-Visualizer/master/Dockerfile --output Dockerfile
curl https://raw.githubusercontent.com/Bishalsarang/Recursion-Tree-Visualizer/master/docker-compose.yml --output docker-compose.yml
2

Start Docker container

CURRENT_UID=$(id -u):$(id -g) docker-compose up
3

Run Python scripts

docker-compose exec vs python fibonacci.py

Troubleshooting

If you get an error about graphviz not being found, make sure you’ve added the graphviz bin directory to your system PATH.On Windows, you can add it programmatically:
import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
If you get an import error, verify that:
  1. You’ve installed the package: pip install recursion-visualiser
  2. You’re using the correct Python environment
  3. The package was installed successfully: pip show recursion-visualiser
If GIF generation fails, ensure:
  1. The imageio package is installed: pip install imageio
  2. You have write permissions in the output directory
  3. The frames directory can be created

Next steps

Quickstart

Create your first recursion tree visualization

Build docs developers (and LLMs) love