Install & Compatibility
Where this runs
tested against v3.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 7.9s · import 1.212s · 230MB
233MB installed
● package 233MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
freud
✓ import freud
✗ from freud import ...
Top-level package. Use freud.box, freud.density, freud.order etc.
Box
✓ from freud.box import Box
✗ import freud.box.Box
Box is a class in freud.box module.
RDF
✓ from freud.density import RDF
✗ from freud import RDF
RDF is in freud.density, not top-level.
NeighborList
✓ from freud.locality import NeighborList
✗ import freud.NeighborList
NeighborList is in freud.locality.
Create a box, random points, compute RDF and neighbor list.
import freud
import numpy as np
# Create a simulation box and random points
box = freud.box.Box.cube(10.0)
points = np.random.uniform(-5, 5, (100, 3))
# Compute radial distribution function
rdf = freud.density.RDF(bins=100, r_max=5.0)
rdf.compute(system=(box, points))
print(rdf.r, rdf.rdf)
# Compute neighbors
nlist = freud.locality.LinkCell().compute(system=(box, points), num_neighbors=6)
print(nlist.nlist.id_i, nlist.nlist.id_j)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'freud'
Package name is 'freud-analysis' on PyPI, not 'freud'.
fixpip install freud-analysis
AttributeError: module 'freud' has no attribute 'Box'
Box is in freud.box submodule, not top-level.
fixfrom freud.box import Box
TypeError: RDF.compute() got an unexpected keyword argument 'normalize'
In freud v3.0.0, 'normalize' was renamed to 'normalization_mode'.
fixReplace normalize=True with normalization_mode='default' (or other valid mode).
ValueError: Shape mismatch: quaternion array must have shape (N,4)
freud.order.Nematic in v3.0.0+ expects orientation vectors (N,3) instead of quaternions.
fixPass orientation vectors (e.g., directors) of shape (N,3).
Upgrade
Version history
3.5.0latest on PyPI · released Oct 8, 2025
Audit
Dependencies
numpyrequiredRequired for array operations and type conversion.
scipyoptionalUsed for spatial computations like Voronoi tesselation.
matplotliboptionalRequired for plotting methods (e.g., PMFTXY.plot).
tbboptionalIntel TBB for parallel acceleration (used if available).
gsdoptionalOptional for reading HOOMD-blue GSD trajectory files.