Skip to content

Installation

Installing MicPy with pip

MicPy is available on PyPI and can be installed using pip:

pip install micress-micpy

For available versions and additional package information, see the MicPy project page on PyPI.

Installing the ParaView Plugin

The ParaView plugin requires MicPy to be available in the Python environment used by ParaView. The recommended approach uses a virtual environment with uv, allowing MicPy and its dependencies to be installed without modifying ParaView's bundled Python environment.

Alternatively, ParaView and MicPy can be installed together in a Conda environment.

This method uses an existing ParaView installation. Install uv before proceeding. Open a terminal in the bin directory of your ParaView installation. The commands below use PowerShell on Windows and Bash on Linux.

1. Create a virtual environment

Create a virtual environment using ParaView's pvpython. The --without-pip option avoids issues with ensurepip in ParaView's bundled Python environment.

venv="$HOME/micpy-pv"
./pvpython -m venv --without-pip "$venv"
$venv = Join-Path $HOME "micpy-pv"
.\pvpython.exe -m venv --without-pip $venv

2. Install MicPy

Install MicPy and its dependencies into the virtual environment using uv:

uv pip install --python "$venv/bin/pvpython" micress-micpy
uv pip install --python "$venv\Scripts\pvpython.exe" micress-micpy

3. Launch ParaView

Launch ParaView with the virtual environment enabled. Use this launch method whenever you want to use the MicPy plugin.

./paraview --venv "$venv"
.\paraview.exe --venv $venv.Replace('\', '/')

4. Load the MicPy plugin

In ParaView, open Tools → Manage Plugins…, click Load New…, and select the MicPy.py plugin file.

You can obtain the path to the plugin file using:

./pvpython --venv "$venv" -c "import micpy.bin as b; print(b.pv_plugin_path())"
.\pvpython.exe --venv $venv.Replace('\', '/') -c "import micpy.bin as b; print(b.pv_plugin_path())"

Optionally, enable Auto Load in the plugin manager to load the plugin automatically in future ParaView sessions started with the virtual environment.

Using a Conda environment (alternative)

Conda provides an alternative approach that installs ParaView and MicPy into a shared environment. This is useful for managing specific ParaView versions or maintaining an isolated installation.

1. Create a Conda environment with ParaView and MicPy

Choose a ParaView version and a compatible Python version.

conda create -y -n micpy-pv -c conda-forge paraview=6.2 python=3.12
conda activate micpy-pv
python -m pip install micress-micpy
conda create -y -n micpy-pv -c conda-forge paraview=6.1 python=3.12
conda activate micpy-pv
python -m pip install micress-micpy
conda create -y -n micpy-pv -c conda-forge paraview=6.0 python=3.12
conda activate micpy-pv
python -m pip install micress-micpy
conda create -y -n micpy-pv -c conda-forge paraview=5.13 python=3.10
conda activate micpy-pv
python -m pip install micress-micpy
conda create -y -n micpy-pv -c conda-forge paraview=5.12 python=3.10
conda activate micpy-pv
python -m pip install micress-micpy
conda create -y -n micpy-pv -c conda-forge paraview=5.11 python=3.9
conda activate micpy-pv
python -m pip install micress-micpy

2. Launch ParaView and load the plugin

With the Conda environment activated, launch ParaView:

conda activate micpy-pv
paraview

In ParaView, open Tools → Manage Plugins…, click Load New…, and select the MicPy.py plugin file. Find its location with:

python -c "import micpy.bin as b; print(b.pv_plugin_path())"

Optionally, enable Auto Load in the plugin manager to load the plugin automatically in future sessions launched from the environment.

Optional: Discover the plugin using PV_PLUGIN_PATH

ParaView can discover plugins from directories listed in the PV_PLUGIN_PATH environment variable. Configure this for the Conda environment with:

conda env config vars set PV_PLUGIN_PATH="$(python -c 'from pathlib import Path; import micpy.bin as b; print(Path(b.pv_plugin_path()).parent)')"
conda deactivate
conda activate micpy-pv

The command above uses Bash syntax. On Windows, use the GUI loading procedure or adapt the environment-variable command for your shell.