Conda environments for Exudyn
Notes on creating and maintaining conda environments for Exudyn — for development, for documentation generation, and for running the examples.
Author: Johannes Gerstmayr
Date: 2026-09-09
For basic setup of Anaconda or Miniconda itself, see the Exudyn documentation.
Dependency policy
numpy is the only hard requirement — it follows from the nature of the C++/Python coupling. Everything else is optional: installing Exudyn pulls the minimum, and functions needing more raise at the point of use. The lists below are therefore conveniences for running examples, not install requirements.
package |
needed for |
|---|---|
numpy |
required, always |
scipy |
FEM, eigenvalue computations, sparse solvers — pin to 1.15.2, see note below |
matplotlib |
plotting in examples and |
ngsolve, h5py |
FEM mesh import and |
numpy-stl |
STL import/export |
numba |
a few accelerated example kernels |
torch, stable-baselines3 |
reinforcement learning examples |
mpi4py |
parallel parameter-variation examples |
tqdm, psutil |
progress bars and process info in |
ipywidgets, ipykernel |
Jupyter notebook usage |
spyder-kernels |
Spyder integration (version must match Spyder, see below) |
The standard environment
venvExuP313 is the reference environment: it runs Exudyn, the generators, the tests and the
documentation build. Its packages are not listed here but in pyproject.toml, as dependency
groups (PEP 735), so this recipe cannot fall behind:
conda create -n venvExuP313 python=3.13 -y
conda activate venvExuP313
cd EXUDYN_git #the repository root, where pyproject.toml is
python -m pip install --upgrade pip #dependency groups need pip >= 25.1
pip install --group dev #docs, lint, build, test and IDE tools, scipy pin, jinja2, griffe
pip wheel . -w dist --no-deps #build Exudyn
pip install --pre --find-links=dist "exudyn[tests]" #the local wheel plus what TestModels/ needs
group |
contains |
used by |
|---|---|---|
|
sphinx and its theme and extensions |
|
|
nothing from pip; the flow charts are committed as PDF and SVG |
|
|
|
CI |
|
|
a direct |
|
|
|
|
|
Spyder and Jupyter |
|
all of the above, plus |
the development environment |
Groups are never published with the wheel, unlike the extras (exudyn[tests] etc.) below, which
users see. A single group can be installed alone, e.g. pip install --group docs.
Why
pybind11inbuild? It is declared inbuild-system.requires, sopip wheel .andpython -m buildinstall it themselves under build isolation. A directpython setup.py bdist_wheeldoes not use build isolation, so there it has to be present in the environment.
Why scipy 1.15.2? scipy 1.18.0 slows the Exudyn test suite from ~22 s to over 10 minutes, apparently in the eigensolver path. The pin is in the
devgroup;exudyn[tests]itself does not pin scipy. It does not apply on macOS and on Python 3.14 and later, where scipy 1.15.2 has no wheel andpip install --group devwould fail (#2886); there the suite may be slower.
Linux: jagged fonts in the dialogs? The
tkpackage of the Anaconda channel is built without Xft, so tkinter draws its fonts without anti-aliasing and in few sizes; the dialogs of Exudyn say so once when they open. The Xft build of conda-forge draws them smoothly:conda install -c conda-forge "tk=*=xft_*"A system Python (
apt install python3-tk) has Xft already (#2890).
spyder-kernels in the
idegroup is3.*, matching Spyder 6; for an older Spyder see the table below and install the matching version afterwards.
Test environments per Python version are named venvP310 … venvP314 and carry an Exudyn build
for that version. --py all of exudev means these five; a newer Python is used when named, e.g.
--py 315 with venvP315 (3.15 and 3.16 are accepted), until wheels are built for it (#2891).
Documentation toolchain only
If an existing environment only needs the docs tools added, from the repository root:
pip install --group docs
Build the HTML documentation from the repository root:
sphinx-build -b html . _build -E
Optional packages via the Exudyn extras
The optional dependencies are declared in pyproject.toml, so they can be installed by name
instead of being listed by hand:
command |
installs |
|---|---|
|
what most models need: scipy (eigenvalues, sparse matrices, FEM) and matplotlib (plots, |
|
the above plus exactly what |
|
the above plus what frequently used features need: numpy-stl (STL import), tqdm (optimization progress), ffmpeg-python (video export; the program itself: |
|
the above plus everything else the package and the Examples refer to: pymeshlab, roboticstoolbox-python, spatialmath-python, numba, dispy, mpi4py |
|
reinforcement learning: torch, stable-baselines3, gymnasium, gym, tensorboard |
[rl] is deliberately not part of [all]: torch is multi-GB and the CPU/CUDA choice is made
with an --index-url, which cannot be expressed in wheel metadata. For a CUDA build, install it
separately first:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install stable-baselines3[extra]
The --index-url above selects the CUDA 11.8 build of PyTorch; drop it for a CPU-only install.
These lists are not maintained by hand. python tools/checkExtras.py scans every import in
exudyn/, TestModels/ and Examples/ and fails if one of them is installed by no extra, so the
table above cannot silently fall behind the code; CI runs it as the check_extras job.
Spyder kernel versions
spyder-kernels must match the Spyder version, or the console fails to start:
Anaconda / Spyder |
spyder-kernels |
|---|---|
Anaconda 2023-07 / Spyder 5.4 |
|
Anaconda 2023-09 / Spyder 5.5, 5.5.1 |
|
Anaconda 2025-06 / Spyder 6.0.7 |
|
Useful conda commands
conda activate ENVNAME # activate an environment
conda deactivate # leave it
conda env list # list all environments
conda list # list packages in the active environment
conda install numpy # install into the active environment
conda install -n ENVNAME numpy # install into a named environment
conda update numpy # update in the active environment
conda remove --name ENVNAME numpy # remove a package
conda remove --name ENVNAME --all -y # delete an entire environment
conda update -n base -c defaults conda -y # update conda itself
manylinux wheels (auditwheel)
Now normally done with Docker; kept here for reference.
pip install auditwheel patchelf
auditwheel repair /mnt/c/DATA/cpp/Exudyn_git/dist/exudyn-1.10.19.dev1-cp314-cp314-linux_x86_64.whl
# produces e.g. exudyn-1.10.19.dev1-cp314-cp314-manylinux_2_34_x86_64.whl