Install & Compatibility
Where this runs
tested against v0.8.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 3.7s
py 3.11
✕ build_error
✓ 3.6s
py 3.12
✕ build_error
✓ 3.8s
py 3.13
✕ build_error
✓ 3.6s
py 3.9
✕ build_error
✕ build_error
86MB installed
● package 86MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
TetGen
✓ from tetgen import TetGen
✗ from tetgen import tetgen
class name is 'TetGen' with capital T and G, not lowercase
Load a surface mesh, create a TetGen instance, tetrahedralize, and access the output mesh.
import pyvista as pv
from tetgen import TetGen
# Load or create a surface mesh (must be a closed, manifold PolyData)
mesh = pv.Sphere()
# Initialize TetGen with the surface
tet = TetGen(mesh)
# Generate tetrahedral mesh (apply attributes/flags as needed)
tet.tetrahedralize()
# Access the resulting tetrahedral mesh
tet_grid = tet.grid
print(tet_grid)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tetgen'
Package not installed or misspelled.
fixRun 'pip install tetgen'. Ensure import uses lowercase 'tetgen'.
ImportError: cannot import name 'TetGen' from 'tetgen'
Incorrect import statement; 'TetGen' is the class.
fixUse 'from tetgen import TetGen'.
RuntimeError: TetGen returned 0 tetrahedra
Input surface mesh is not closed, is non-manifold, or has self-intersections.
fixCheck mesh closure with 'mesh.is_all_manifold' and 'mesh.is_closed'. Repair as needed.
Upgrade
Version history
0.8.4latest on PyPI · released May 4, 2026
Audit
Dependencies
numpyrequiredcore dependency for array operations
pyvistaoptionalrecommended for visualization and mesh handling