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 |
|---|---|
|
Path morphing interpolation |
|
SVG path parsing and morphing |
|
SVG/HTML parsing |
|
XML backend for BeautifulSoup |
|
Browser-based viewer |
Optional Dependencies¶
These are only needed for specific export formats:
Package |
Required for |
|---|---|
|
PNG export ( |
|
GIF export ( |
|
Video export ( |
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 ffmpegArch Linux:
sudo pacman -S ffmpegmacOS:
brew install ffmpegWindows: 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) |
|
Linux (Arch) |
|
macOS |
|
Windows |
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.