Skip to main content

Installing MeshMash

MeshMash can be installed using pip or from source. The library requires Python 3.12.

Requirements

MeshMash requires Python 3.12 (Python 3.13 is not yet supported)

Installation Methods

Dependencies

MeshMash automatically installs the following core dependencies:
  • numpy (>=1.26.0): Array operations and numerical computing
  • scipy (>=1.15.0): Sparse matrices and scientific algorithms
  • pandas (>=2.2.3): Data structures for features and graphs
  • gpytoolbox (>=0.3.3): Computational geometry utilities
  • robust-laplacian (>=1.0.0): Robust Laplacian for non-manifold meshes
  • pyvista (>=0.44.1): 3D mesh visualization and processing
  • fast-simplification (>=0.1.7): Mesh simplification algorithms
  • fastremap (>=1.16.1): Fast array remapping operations
  • tqdm-joblib (>=0.0.4): Progress bars for parallel processing

Optional Dependencies

For additional functionality, you may want to install:
pip install pymeshfix

Why these optional packages?

  • pymeshfix: Required for fix_mesh() function to repair broken meshes
  • cloud-files: Needed for cloud storage I/O operations (Google Cloud, AWS S3)
  • scikit-learn: Used by project_points_to_mesh() for nearest neighbor search

Verify Installation

Check that MeshMash is installed correctly:
import meshmash
import numpy as np

# Create a simple test mesh (tetrahedron)
vertices = np.array([
    [0, 0, 0],
    [1, 0, 0],
    [0, 1, 0],
    [0, 0, 1]
], dtype=np.float64)

faces = np.array([
    [0, 1, 2],
    [0, 1, 3],
    [0, 2, 3],
    [1, 2, 3]
], dtype=np.int32)

mesh = (vertices, faces)

# Compute Laplacian
L, M = meshmash.cotangent_laplacian(mesh)
print(f"Laplacian shape: {L.shape}")
print("MeshMash is working correctly!")

Troubleshooting

MeshMash requires Python 3.12. If you see version errors:
# Check your Python version
python --version

# Use a specific Python version
python3.12 -m pip install meshmash
If you encounter dependency conflicts, try installing in a fresh virtual environment:
python3.12 -m venv meshmash-env
source meshmash-env/bin/activate  # On Windows: meshmash-env\Scripts\activate
pip install meshmash
If you get import errors for optional dependencies:
# For mesh fixing
pip install pymeshfix

# For cloud I/O
pip install cloud-files

# For point projection
pip install scikit-learn

Next Steps

Quick Start Guide

Ready to start processing meshes? Check out the quick start guide for practical examples.

Build docs developers (and LLMs) love