Installing CryoViT

CryoViT is a Python application, and is installable via pip. For most users, this is the recommended installation method.

If you plan on using CryoViT for complicated experiments, or want to extend its functionality, you may want to install it from source.

After installation, you can check that CryoViT is available by running

$ cryovit --help

This should display the basic usage information for the CryoViT command-line interface (CLI).

Tip

For local development or even usage, it is recommended to install CryoViT into a separate non-global environment (e.g., using venv or conda environments). This prevents dependency conflicts with other Python packages you may have installed.

The authors recommend using miniforge, a lightweight version of conda, to manage environments and dependencies.

PyPI package

CryoViT is available on the Python Package Index (PyPI). The preferred tool for installing packages from PyPI is pip, which is included by default with all modern versions of Python.

To install the latest stable release of CryoViT, run

$ pip install -U cryovit

Installing from PyPI will naturally give access to all features covered in the user guide, including the CLI and napari plugin. However, some advanced features, such as training on clusters and large-scale experiments, require building from source, as described below.

Installation from Source

You can install CryoViT directly from a clone of the Git repository. This requires having git installed on your system, as well as a conda-based Python distribution such as miniforge.

First, clone the repository:

$ git clone https://github.com/VivianDLi/CryoVIT.git
$ cd CryoVIT

Next, create a conda environment based on the provided environment file:

$ conda env create -f environment.yaml

This will create a conda environment named cryovit_env with all required dependencies.

The final step is then to activate the environment and install CryoViT in editable mode:

$ conda activate cryovit_env
$ pip install -e .

This will track any changes you make to the source code, allowing you to use CryoViT for development and testing.