Installation#

Requirements#

  • Python ≥ 3.9

  • A supported platform: Linux, macOS, or Windows

All core dependencies are installed automatically by pip.

From Source (development)#

Clone the repository and install in editable mode:

git clone https://github.com/Dessia-tech/routing.git
cd routing
pip install -e ".[dev]"

The [dev] extras install testing and linting dependencies.

Dependencies#

Core dependencies (installed automatically):

  • volmdlr — 3D CAD geometry: STEP file loading, mesh operations

  • numpy — array operations, voxelization

  • scipy — simulated annealing optimizer (dual_annealing)

  • piping_3d — pipe section definitions (piping.Section)

  • dessia_common — serialization base classes

Optional dependencies (not installed by default):

  • open3d — 3D visualization for the pathfinding example scripts (scripts/pathfinding/examples/03_view_map.py)

  • plotly — interactive 3D plots for Theta* comparison example (scripts/pathfinding/examples/04_theta_star.py)

Install optional dependencies as needed:

pip install open3d plotly

Upgrading#

pip install --upgrade routing

Checking the Installation#

Run the quickstart example to confirm everything works:

import numpy as np
from routing.pathfinding.core.grid import Grid
from routing.pathfinding.finder.a_star import AStarFinder
from routing.pathfinding.core.diagonal_movement import DiagonalMovement

matrix = np.ones((5, 5, 5))
matrix[2, 2, 2] = 0   # obstacle
grid  = Grid(matrix=matrix)
start = grid.node(0, 0, 0)
end   = grid.node(4, 4, 4)

finder = AStarFinder(diagonal_movement=DiagonalMovement.always)
path, runs = finder.find_path(start, end, grid)
print(f"Path found: {len(path)} nodes in {runs} iterations")

If this prints a path, the installation is working correctly.