Skip to content

Installation

Requirements

Install these tools before creating a project:

Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Alternatively, use a package manager:

brew install uv
sudo port install uv
winget install --id=astral-sh.uv -e
scoop install main/uv
pipx install uv
cargo install --locked uv

Install utility-viz

utility-viz 2.0 is in beta

utility-viz 2.0.0b1 is a pre-release. The stable line stays econ-viz 1.x until 2.0 final is released. Pre-releases are skipped by default, so the commands below pass --pre (pip) or --prerelease allow (uv). Coming from econ-viz? See Migrating from econ-viz.

With pip:

pip install --pre utility-viz

With uv, create a project and add it as a dependency:

uv init my-diagrams
cd my-diagrams
uv add --prerelease allow utility-viz

Run scripts inside the project environment with uv run:

uv run python main.py

Optional dependencies

Extras enable features that require additional packages:

uv add --prerelease allow "utility-viz[animation]"    # GIF export (Pillow)
uv add --prerelease allow "utility-viz[interactive]"  # notebook widgets
uv add --prerelease allow "utility-viz[all]"          # all extras

Global CLI installation

To use only the command-line interface, install it as a standalone tool so utility-viz is available on your PATH:

uv tool install --prerelease allow utility-viz

Development setup

git clone https://github.com/EconViz/utility-viz.git
cd utility-viz
uv sync --all-extras

uv sync installs the dev dependency group by default; --all-extras also installs every optional dependency. Run the test suite with:

uv run pytest

Verifying the installation

uv run utility-viz --version
uv run utility-viz help

Comments