Installation¶
Installing MicPy with pip¶
MicPy is available on PyPI and can be installed using pip:
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.
Using a virtual environment (recommended)¶
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.
2. Install MicPy¶
Install MicPy and its dependencies into the virtual environment using uv:
3. Launch ParaView¶
Launch ParaView with the virtual environment enabled. Use this launch method whenever you want to use the MicPy plugin.
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:
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.
2. Launch ParaView and load the plugin¶
With the Conda environment activated, launch ParaView:
In ParaView, open Tools → Manage Plugins…, click Load New…, and select the MicPy.py plugin file. Find its location with:
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.