Install & Compatibility
Where this runs
tested against v9.0.1 · 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 1.472s · 231.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 7.3s · import 1.378s · 222MB
230MB installed
● package 230MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Point
✓ from skspatial.objects import Point
Main class for points.
Line
✓ from skspatial.objects import Line
Main class for lines.
Plane
✓ from skspatial.objects import Plane
Main class for planes.
Vector
✓ from skspatial.objects import Vector
Main class for vectors.
Create a point, line, and vector; compute distance from point to line.
from skspatial.objects import Point, Line, Vector
point = Point([1, 2, 3])
line = Line(point=[0, 0, 0], direction=[1, 1, 1])
vector = Vector([1, 0, 0])
print(point)
print(line)
print(vector)
# Distance from point to line
dist = line.distance_point(point)
print(f"Distance: {dist}")
Errors
Common errors & fixes
AttributeError: 'Point' object has no attribute 'plot'
Plotting requires matplotlib, which is an optional dependency.
fixInstall matplotlib: pip install matplotlib. Then re-run your code.
TypeError: __init__() takes 1 positional argument but 4 were given
Using old constructor style Point(x, y, z) instead of Point([x, y, z]).
fixPass coordinates as a single list: Point([x, y, z]).
ValueError: The direction vector cannot be zero.
Creating a Line with a zero direction vector.
fixEnsure the direction vector is non-zero, e.g., Line(point=[0,0,0], direction=[1,0,0]).
Upgrade
Version history
9.0.1latest on PyPI · released Apr 17, 2025
Audit
Dependencies
numpyrequiredAll spatial objects are backed by NumPy arrays.
matplotliboptionalRequired for plotting functionality (e.g., plot methods).