Installation

Install witwin 0.4.0 from PyPI, pick a PyTorch build for CPU or CUDA, and check that the package imports.

Install Core with pip:

pip install witwin

witwin 0.4.0 is a pure-Python wheel (witwin-0.4.0-py3-none-any.whl) on PyPI. It contains no C++ or CUDA code, so it installs the same way on Windows, Linux and macOS. You usually do not install it by hand: witwin-maxwell, witwin-radar and witwin-channel pull in the version they need.

Requirements#

RequirementVersion
PythonCPython 3.10, 3.11, 3.12, 3.13 or 3.14 (>=3.10,<3.15)
PyTorchtorch>=2.10
NumPynumpy>=1.24
GPUNot required. Core runs on any device PyTorch supports.

Core has no Dr.Jit, Mitsuba or native dependency. Every continuous value is a PyTorch tensor, and Core computes on the device where your tensors live.

Choose a PyTorch build#

pip installs the default torch wheel from PyPI if none is present. On Windows that wheel is CPU-only. If you want CUDA tensors, install a CUDA build of PyTorch first, then Core:

python -m pip install torch --index-url https://download.pytorch.org/whl/cu128
python -m pip install witwin==0.4.0

If you plan to use Channel, match its pins instead: CPython 3.11 and torch==2.10.0. See Channel installation.

Warning

Do not use the witwin[maxwell], witwin[radar], witwin[genesis] or witwin[all] extras of 0.4.0. They still point at old solver ranges (witwin-maxwell<0.3, witwin-radar<0.4), and witwin-genesis is not on PyPI. Install each solver by its own name, for example pip install witwin-maxwell.

Verify the installation#

import torch
import witwin.core as core
 
print(core.__version__, torch.__version__)
box = core.Box(size=(2.0, 2.0, 2.0))
print(box.signed_distance(torch.tensor(0.0), torch.tensor(0.0), torch.tensor(0.0)))

Expected output (your PyTorch version string may differ):

0.4.0 2.10.0
tensor(-1.)

The point at the origin is 1 m inside a 2 m cube, so its signed distance is -1.

How this was verified

The check above was run on Windows 11 with Python 3.11, a CUDA build of torch 2.10.0 and witwin 0.4.0 installed in editable mode from the release commit (46c826d). The Core test suite (105 tests) passed in the same environment.

Install from source#

Clone the repository and install it in editable mode when you work on Core itself:

git clone https://github.com/witwin-ai/witwin-core.git
cd witwin-core
python -m pip install -e .
python -m pytest

The build backend is Hatchling. The source tree contains only Python files.