Install & Compatibility
Where this runs
tested against v4.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
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.0s · import 0.102s · 126MB
128MB installed
● package 128MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
embreex
✓ import embreex
The core library is imported directly as `embreex`.
RayMeshIntersector
✓ from embreex import RayMeshIntersector
Used for creating a ray intersector object.
EmbreeTrimesh
✓ from embreex import EmbreeTrimesh
Used for creating an Embree-compatible mesh from NumPy arrays.
This quickstart demonstrates how to create a basic triangular mesh, initialize an `EmbreeTrimesh` object, create a `RayMeshIntersector`, and perform a ray-mesh intersection query to check for hits and retrieve hit details.
import embreex
import numpy as np
# Define a simple mesh (e.g., a triangle)
vertices = np.array([
[0.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[0.0, 1.0, 0.0]
], dtype=np.float32)
faces = np.array([
], dtype=np.int32)
# Create an Embree mesh object
mesh = embreex.EmbreeTrimesh(vertices, faces)
# Create a ray intersector from the mesh
intersector = embreex.RayMeshIntersector(mesh)
# Define a single ray (origin and direction)
ray_origins = np.array([[0.1, 0.1, 1.0]], dtype=np.float32)
ray_directions = np.array([[0.0, 0.0, -1.0]], dtype=np.float32)
# Check if the ray hits the mesh
hits = intersector.intersects_any(ray_origins, ray_directions)
print(f"Ray hits mesh: {hits}")
# Find the first hit location and triangle index
index_tri, u, v, t = intersector.intersects_first(ray_origins, ray_directions)
if index_tri != -1:
print(f"\nFirst hit details:")
print(f" Hit triangle index: {index_tri}")
print(f" Barycentric coordinates (U, V): {u:.4f}, {v:.4f}")
print(f" Distance along ray (t): {t:.4f}")
else:
print("\nNo hit found for the ray.")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'embreex'
The 'embreex' module is not installed in the Python environment.
ImportError: cannot import name 'EmbreeScene'
The 'EmbreeScene' class is not available in the 'embreex' module, possibly due to a version mismatch or incorrect import.
fixfrom embreex import Scene
AttributeError: module 'embreex' has no attribute 'Ray'
The 'Ray' attribute does not exist in the 'embreex' module, likely due to changes in the module's API.
fixfrom embreex import Ray
ERROR: Could not find a version that satisfies the requirement embreex (from versions: none)
`pip` was unable to find a pre-built wheel for your specific operating system, architecture, or Python version, and building from source failed or was not attempted.
fixEnsure your Python environment (version, OS, architecture) is compatible with `embreex`'s supported platforms. Update pip (`python -m pip install --upgrade pip`) and retry.
ImportError: DLL load failed while importing _embreex
The `embreex` package's underlying native C++ extension (`_embreex.pyd` or `_embreex.so`) failed to load at runtime, likely due to a missing system dependency like a C++ runtime library or a component of the Embree library.
fixEnsure your system's C++ runtime libraries are up to date (e.g., Microsoft Visual C++ Redistributable on Windows). Try reinstalling `embreex` (`pip install --force-reinstall embreex`).
Upgrade
Version history
4.4.0latest on PyPI · released Apr 22, 2026
Audit
Dependencies
numpyrequiredRequired for defining mesh data (vertices, faces) and ray data (origins, directions) in typical usage examples. While not a direct pip install dependency, practical use highly depends on it.