Nion Swift Installation

For the fastest setup, download a pre-built version that includes everything needed to run the basic application with key plug-ins.

Installing from PyPI

Nion Swift is available on PyPI and installs into an isolated Python virtual environment using common Python tools.

Each approach below creates a self-contained environment so Nion Swift does not interfere with other Python software on your machine.

Requirements

  • Python 3.14 or later

  • macOS 12 or later

  • Windows 10 or later

  • Linux — a recent distribution (Ubuntu 20.04+, Fedora 36+, or equivalent)

Using pip and venv

pip and venv are built into Python and work on every platform. Install Python 3.14 or later first, then create a virtual environment and install Nion Swift.

Step 1 — Install Python 3.14+

Download from python.org or install via Homebrew:

$ brew install python@3.14

Download from python.org or install via winget:

> winget install Python.Python.3.14

Install via your distribution’s package manager. For example on Debian/Ubuntu:

$ sudo apt install python3.14 python3.14-venv

Step 2 — Create a virtual environment and install

$ python3.14 -m venv nionswift-env
$ source nionswift-env/bin/activate
$ python -m pip install nionswift nionswift-tool
> py -3.14 -m venv nionswift-env
> nionswift-env\Scripts\activate
> python -m pip install nionswift nionswift-tool

Step 3 — Run Nion Swift

$ nionswift

To run Nion Swift in future sessions, activate the environment first:

$ source nionswift-env/bin/activate
$ nionswift
> nionswift-env\Scripts\activate
> nionswift

Using uv

uv is a fast, modern Python environment and package manager. It can install Python for you, so no separate Python installation step is required.

Step 1 — Install uv

Install via Homebrew:

$ brew install uv

Install via winget:

> winget install astral-sh.uv

Install via your distribution’s package manager. For example on Debian/Ubuntu:

$ sudo apt install uv

Or on Fedora:

$ sudo dnf install uv

If uv is not available in your distribution’s repositories, see the uv installation docs.

Step 2 — Create a virtual environment and install

uv will download Python 3.14 automatically if it is not already present on your system.

$ uv venv --python 3.14 nionswift-env
$ source nionswift-env/bin/activate
$ uv pip install nionswift nionswift-tool
> uv venv --python 3.14 nionswift-env
> nionswift-env\Scripts\activate
> uv pip install nionswift nionswift-tool

Step 3 — Run Nion Swift

$ nionswift

To run Nion Swift in future sessions, activate the environment first:

$ source nionswift-env/bin/activate
$ nionswift
> nionswift-env\Scripts\activate
> nionswift

Using conda with pip

If you use the Conda package manager (via Miniforge, Miniconda, or Anaconda), create a dedicated environment and install Nion Swift from PyPI using pip.

Install Miniforge (recommended) from the Miniforge releases page.

Create a dedicated environment and install

$ conda create -n nionswift python=3.14
$ conda activate nionswift
$ python -m pip install nionswift nionswift-tool

Run Nion Swift

$ nionswift

To run Nion Swift in future sessions:

$ conda activate nionswift
$ nionswift

Installing Extensions

Extensions add capabilities to Nion Swift and are installed into the same virtual environment. Restart Nion Swift after installing an extension to load it.

$ python -m pip install nionswift-usim
$ uv pip install nionswift-usim
$ python -m pip install nionswift-usim

Browse all available extensions at pypi.org.

These extensions are commonly used:

Extension

Description

nionswift-usim

A STEM microscope simulator for development and offline use

nionswift-eels-analysis

Tools for EELS analysis

nionswift-video-capture

Capture video from your computer’s camera or a web stream

nionswift-experimental

Experimental tools (see project home page for details)

Updating Nion Swift

Activate your environment and run the appropriate pip upgrade command.

$ python -m pip install --upgrade nionswift nionswift-tool
$ uv pip install --upgrade nionswift nionswift-tool

After activating your conda environment, use python -m pip to upgrade:

$ python -m pip install --upgrade nionswift nionswift-tool

Uninstalling Nion Swift

Remove Nion Swift and its environment using the method that matches your installation.

To remove the environment and all installed packages:

$ rm -rf nionswift-env

On Windows:

> rmdir /s /q nionswift-env

To remove the environment and all installed packages:

$ rm -rf nionswift-env

On Windows:

> rmdir /s /q nionswift-env

To remove the conda environment:

$ conda remove -n nionswift --all