Install & Compatibility
Where this runs
tested against v5.4.0 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.074s · 19.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.066s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
BSpline
✓ from geomdl import BSpline
✗ from geomdl.BSpline import BSpline
BSpline is a module, the class is inside it
NURBS
✓ from geomdl import NURBS
✗ from geomdl.NURBS import NURBSCurve
NURBS is a module; use NURBS.Curve() or NURBS.Surface()
fitting
✓ from geomdl import fitting
✗ from geomdl.fitting import approximate_surface
fitting is a module, not a function; access functions as fitting.approximate_surface()
Create and evaluate a B-Spline curve using the geomdl library.
from geomdl import BSpline
from geomdl import knotvector
from geomdl import utilities
# Create a 3D B-Spline curve
curve = BSpline.Curve()
curve.degree = 3
curve.ctrlpts = [[0, 0, 0], [1, 2, 0], [3, 1, 0], [4, 2, 0], [5, 0, 0]]
curve.knotvector = knotvector.generate(curve.degree, len(curve.ctrlpts))
curve.delta = 0.01
curve.evaluate()
# Print evaluated points
for pt in curve.evalpts:
print(pt)
Errors
Common errors & fixes
AttributeError: module 'geomdl' has no attribute 'NURBS'
Incorrect import path; NURBS is now a submodule, not a direct attribute.
fixUse `from geomdl import NURBS` or `import geomdl.NURBS`.
TypeError: curve() takes no arguments
Attempting to instantiate a class directly from the module (e.g., `BSpline.Curve()` is correct, but `BSpline()` is the module, not the class).
fixUse `from geomdl import BSpline` then `curve = BSpline.Curve()`.
ModuleNotFoundError: No module named 'geomdl.vis'
The vis module was removed in newer versions.
fixUse `from geomdl.visualization import VisMPL` instead.
ValueError: knotvector of length 8 is not appropriate for degree 3 with 5 control points
Knot vector length must equal number of control points + degree + 1. Generated using helper.
fixUse `knotvector.generate(degree, num_ctrlpts)` to generate correct knot vector.
Upgrade
Version history
5.4.0latest on PyPI · released May 23, 2025
Audit
Dependencies
numpyoptionalRequired for array operations
matplotliboptionalRequired for visualization
plotlyoptionalAlternative visualization backend