pygmsh
Python frontend for Gmsh
Decision gist · record as of 2026-08-14
Yes, with conditions. pygmsh is stable and well-established for mesh generation tasks in scientific computing. Install friction is low and there are no known vulnerabilities. However, maintenance is dormant—the last release was 2022-01-28. Choose this if you need a mature, proven mesh generation interface and can tolerate infrequent updates. The GPLv3+ license requires any derivative work to remain open-source. Verify compatibility with your Gmsh version before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Gmsh itself must be installed separately (e.g., apt install python3-gmsh on Debian/Ubuntu or via other system package managers).
- Low install friction: pure Python wheel with three runtime dependencies (gmsh, meshio, numpy).
- Maintenance is dormant—last release was 2022-01-28, though the repository remains active with 968 stars and is not archived.
License · maintenance · safety
copyleft license (copyleft) — Licensed under GPLv3+, a copyleft license. Any derivative work or distribution must also be open-source under a compatible license; proprietary projects cannot use this package without legal review.
last release 2022-01-28 (1659 days) · last repo commit 2023-10-04 · 968 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 83,378 downloads/mo, #14,078 on PyPI
Alternatives
Verify before relying
pip install pygmsh
import pygmsh
with pygmsh.geo.Geometry() as geom:
geom.add_circle([0.0, 0.0], 1.0, mesh_size=0.2)
mesh = geom.generate_mesh()
mesh.write("output.vtk")- Current maintenance status and likelihood of future updates or bug fixes beyond the 2022 release.
- Compatibility with Gmsh versions released after the package's last update in 2022.
- Whether dormant status indicates the package is stable and feature-complete or at risk of bitrot.
What it is and what it does
pygmsh is a Python wrapper around Gmsh, a widely-used open-source mesh generator. It abstracts Gmsh's native Python API to make it easier to programmatically define 2D and 3D geometries and generate unstructured meshes. The package supports both simple geometric primitives (polygons, circles, splines) and more complex CAD-style operations via OpenCASCADE (boolean operations, extrusions, revolutions). Generated meshes are returned as meshio objects, which can be written to standard formats like VTK or MSH.
Typical workflows involve defining a geometry within a context manager, optionally configuring mesh refinement or boundary layers, calling generate_mesh(), and then writing or analyzing the result. The package depends on gmsh (the underlying solver), meshio (mesh I/O and representation), and numpy (numerical arrays). It supports Python 3.7 and later and is classified as Production/Stable, though releases have been infrequent since early 2022.
Use it for
- Generate finite element meshes for computational fluid dynamics or structural analysis simulations.
- Create unstructured meshes for complex 2D or 3D geometries defined programmatically in Python.
- Automate mesh generation in parametric design workflows where geometry varies with input parameters.
- Refine meshes locally near boundaries or regions of interest using boundary layer and callback functions.
- Export geometries to standard mesh formats (VTK, MSH) for visualization or downstream analysis tools.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
pygmsh is stable and well-established for mesh generation tasks in scientific computing. Install friction is low and there are no known vulnerabilities. However, maintenance is dormant—the last release was 2022-01-28. Choose this if you need a mature, proven mesh generation interface and can tolerate infrequent updates. The GPLv3+ license requires any derivative work to remain open-source. Verify compatibility with your Gmsh version before committing to production use.
Install
pygmsh on PyPI
Before you install
Low install friction: pure Python wheel with three runtime dependencies (gmsh, meshio, numpy). Maintenance is dormant—last release was 2022-01-28, though the repository remains active with 968 stars and is not archived.
Gmsh itself must be installed separately (e.g., apt install python3-gmsh on Debian/Ubuntu or via other system package managers).
License in practice
Licensed under GPLv3+, a copyleft license. Any derivative work or distribution must also be open-source under a compatible license; proprietary projects cannot use this package without legal review.
Quickstart
pip install pygmsh
import pygmsh
with pygmsh.geo.Geometry() as geom:
geom.add_circle([0.0, 0.0], 1.0, mesh_size=0.2)
mesh = geom.generate_mesh()
mesh.write("output.vtk")
Verify before relying
- Current maintenance status and likelihood of future updates or bug fixes beyond the 2022 release.
- Compatibility with Gmsh versions released after the package's last update in 2022.
- Whether dormant status indicates the package is stable and feature-complete or at risk of bitrot.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesgmshmeshionumpy |
| Maintenance | Dormant 1,659 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 83,378 / month, #14,078 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: MathematicsTopic :: Utilities |
Evidence: pygmsh-7.1.17-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gmsh python wrapper”
- pygmshpygmsh provides a Python interface to Gmsh, a mesh generation tool,…
- gmshGmsh is a three-dimensional finite element mesh generator that wraps…
- meshioReads and writes mesh files in dozens of formats (STL, VTK, Gmsh,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also gmsh · meshio · pysplashsurf · meshioplusplus · fast-simplification · scikit-fem · build123d · euclid3 · pymeshlab · manifold3d