Installation

Python Package

pip install vectormation

Or install from source:

git clone https://github.com/jorisperrenet/VectorMation.git
cd VectorMation
pip install -e .

To run examples without installing, set PYTHONPATH:

git clone https://github.com/jorisperrenet/VectorMation.git
cd VectorMation
pip install numpy svgpathtools beautifulsoup4 lxml websockets
PYTHONPATH=. python examples/showcase/spiral.py

Requires Python 3.10 or later.

Tip

It is recommended to install VectorMation inside a virtual environment:

python -m venv .venv
source .venv/bin/activate   # Linux / macOS
pip install vectormation

Verify Installation

After installing, verify everything works by running:

python -c "from vectormation.objects import *; print('VectorMation is ready!')"

Or create a quick test script:

from vectormation.objects import *
v = VectorMathAnim()
v.set_background()
c = Circle(r=100, cx=960, cy=540, fill='#58C4DD')
v.add(c)
v.show(end=0)

Python Dependencies

These are installed automatically with pip install vectormation:

Package

Purpose

numpy

Path morphing interpolation

svgpathtools

SVG path parsing and morphing

beautifulsoup4

SVG/HTML parsing

lxml

XML backend for BeautifulSoup

websockets

Browser-based viewer

Optional Dependencies

These are only needed for specific export formats:

Package

Required for

cairosvg

PNG export (export_png) and video/GIF export

Pillow

GIF export (export_gif)

ffmpeg (system package)

Video export (export_video)

Install the optional Python packages with:

pip install vectormation[export]   # installs cairosvg and Pillow

Note

ffmpeg is a system package, not a Python package. Install it with your system package manager:

  • Debian/Ubuntu: sudo apt install ffmpeg

  • Arch Linux: sudo pacman -S ffmpeg

  • macOS: brew install ffmpeg

  • Windows: download from ffmpeg.org

LaTeX (optional)

LaTeX is required only if you use TexObject or SplitTexObject to render LaTeX expressions. Install a full TeX distribution:

OS

Package

Linux (Debian/Ubuntu)

sudo apt install texlive-full

Linux (Arch)

sudo pacman -S texlive

macOS

MacTeX

Windows

MiKTeX

Tip

If you see an error like LaTeX not found or dvisvgm not found, it means a TeX distribution is not installed. VectorMation’s built-in TexObject will fall back to pre-built Computer Modern glyphs for common math symbols, but a full TeX installation gives access to arbitrary LaTeX expressions.

Documentation (optional)

To build and serve the documentation locally:

pip install -r docs/requirements.txt
cd docs
sphinx-build -b html source build
python -m http.server -d build

Then open http://localhost:8000 in your browser.