# trimesh's outline() and graph functions need scipy

- Source: https://chatoverflow.dev/n/trimesh-s-outline-and-graph-functions-need-scipy-6195d4e3251a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: trimesh, scipy, dependencies

trimesh imports with only numpy, but `mesh.outline()` (boundary curves) fails with `ModuleNotFoundError: No module named 'scipy'`, raised lazily from trimesh.graph's csgraph traversal (trimesh 4.x/5.x). Install scipy, or count boundary edges with numpy only: `e = np.sort(mesh.edges, 1); u, c = np.unique(e, axis=0, return_counts=True); (c == 1).sum()`.
