Installation#
PyMORGAN requires Python 3.11 or later (Python 3.12+ recommended). It can be installed directly from PyPI, installed from source using uv, or deployed on Windows, macOS, and Linux lab workstations using the standalone PyMORGAN Suite installers.
Quick Install via PyPI (Recommended)#
To install the latest official release into your active Python environment:
pip install pymorgan
# or with uv:
uv pip install pymorgan
# Register bundled fonts into matplotlib:
pymorgan-install-fonts
You can also launch the graphical interface directly without prior installation using uvx:
uvx --from pymorgan pymorgan-gui
Cross-Platform Standalone Installers (PyMORGAN Suite)#
For lab workstations and end-users who prefer a self-contained installation without manually managing a Python environment, PyMORGAN Suite ships native standalone distributions for Windows, macOS, and Linux on GitHub Releases:
Windows (x64)#
Windows Setup Wizard (
PyMORGAN_Suite_Setup_v*.exe): Compiled with Inno Setup; registers Windows Start Menu shortcuts, Desktop icons featuring official software emblems, and native file associations for 1D datasets (.pdat) and 2D datasets (.p2dat). Double-clicking a.pdator.p2datfile opens it directly in PyMORGAN.Windows Portable Archive (
PyMORGAN_Suite_v*_Windows_x64_Portable.zip): Zero-install portable archive containingPyMORGAN_Suite.exe,PyMORGAN.exe, andPyRATE-TA.exe.
macOS (Apple Silicon / Intel)#
macOS Disk Image (
PyMORGAN_Suite_v*_macOS.dmg) & App Bundle (PyMORGAN Suite.app): Deep code-signed (codesign --verify --deep --strict) macOS application bundle containingPyMORGAN_Suite,PyMORGAN, andPyRATE-TAinsideContents/MacOSwith native high-resolutionpymorgan.icnsicons.
Linux (x86_64)#
Linux Tarball & Desktop Installer (
PyMORGAN_Suite_v*_Linux_x86_64.tar.gz): Contains standalone binaries (bin/PyMORGAN_Suite,bin/PyMORGAN,bin/PyRATE-TA), freedesktop.desktopapplication launchers (desktop/*.desktop), and automatedinstall.sh/uninstall.shscripts for desktop menu integration.
Key Features of the Standalone Suite#
Zero external dependencies: Bundles a standalone Python runtime, C-extensions, PyQt6, and all scientific libraries. Executables launch directly into the graphical interface without exposing background terminal windows.
Integrated Suite Launcher: Includes the unified
PyMORGAN_Suitelauncher for one-click startup of both PyMORGAN (processing and visualisation) and PyRATE-TA (kinetic and target fitting).1-Click Local Python Environment Setup (
pymorgan-setup-env): Even when installed from the standalone Suite installer on Windows, macOS, or Linux, users can open Tools → Setup in Local Python Environment… in the Suite Launcher (or click Setup in Python… in the About dialog) to automatically configure any local Conda, Homebrew,uv, or system Python environment soimport pymorganandimport pyrate_tawork directly in Jupyter notebooks and scripts.
Installation from Source#
Step 1 — Install Python 3.12+#
Windows: Download the official installer from python.org (tick Add Python to PATH), or use the Windows Store / Python Standalone Builds:
python --version # should print Python 3.12.x or later
macOS:
brew install python@3.12
Linux (Debian/Ubuntu):
sudo apt update sudo apt install python3.12 python3.12-venv python3.12-dev
Step 2 — Install uv#
uv is a single self-contained binary that manages virtual environments and dependencies:
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Via pip (any OS):
pip install uv
Step 3 — Clone the Repository & Create the Environment#
git clone https://github.com/RJFernandezTeran/PyMORGAN.git
cd PyMORGAN
uv venv # creates .venv/
uv pip install -e ".[dev]" # editable install + ruff + pytest
uv run pymorgan-install-fonts # copy bundled fonts into matplotlib
uv venvcreates a.venv/virtual environment in the repository root.uv pip install -e ".[dev]"installs all core runtime dependencies plus development extras (ruffandpytest) in editable mode so source edits take effect immediately.uv run pymorgan-install-fontscopies the bundledTeX Gyre HerosandTgTermesfonts used by the plot style profiles into Matplotlib’s font cache.
Step 4 — Verify the Installation#
uv run python -c "import pymorgan; print(pymorgan.__version__)"
uv run pymorgan-gui
uv run pytest
uv run python scripts/run_checks.py
Dependencies#
Package |
Minimum |
Purpose |
|---|---|---|
|
|
Multi-dimensional array operations |
|
|
Signal processing, Savitzky–Golay filters, and non-linear least squares |
|
|
Publication-grade plotting back-end |
|
|
C-accelerated tabular data and I/O |
|
|
HDF5 file I/O (PyMESS |
|
|
Zero-level alignment for dual-axis reference overlays |
|
|
Comment-preserving |
|
|
Image and animated GIF export |
|
|
Graphical user interface framework |
|
|
Perceptually uniform scientific colourmaps |
|
|
Hardened XML parsing for Qt Designer |
Extra Group |
Packages |
Install Command |
|---|---|---|
|
|
|
|
|
|
|
|
|
Keeping Packages Up to Date#
uv lock --upgrade # resolve latest versions, update uv.lock
uv sync # install the resolved versions into .venv
Console Scripts#
Script |
Purpose |
|---|---|
|
Launch the PyQt6 graphical interface |
|
Launch the unified PyMORGAN + PyRATE-TA Suite Launcher |
|
Install bundled |
|
Open |
|
Standalone settings editor (no dataset required) |
|
1-click local Python environment setup wizard (CLI or GUI) |
|
Run the built-in self-test verification runner |
GUI Layout and Compiled UI#
The GUI layout is defined in src/pymorgan/gui/main_window.ui (Qt Designer XML). For startup
performance (~1.5× faster), PyMORGAN ships a pre-compiled Python translation,
main_window_ui.py, generated by pyuic6. Whenever main_window.ui is modified in Qt
Designer, PyMORGAN detects the timestamp difference on launch and automatically regenerates
main_window_ui.py before opening the window. To force a manual recompile:
uv run pyuic6 src/pymorgan/gui/main_window.ui -o src/pymorgan/gui/main_window_ui.py
Software Updates (Releases & Bleeding Edge)#
PyMORGAN includes an integrated software update delivery system supporting both official releases and bleeding-edge development builds:
Automatic background checks: At launch, PyMORGAN performs a non-blocking GitHub API query (throttled to once every 24 hours). When a new version is available, a status bar badge appears (e.g.
[PyMORGAN vX.Y.Z Available]).Release vs. Bleeding-Edge channel: Users can check for updates at any time via Help → Check for Updates (Release / Bleeding Edge)… or from the About dialog, choosing either the latest tagged GitHub Release or syncing directly with the bleeding-edge
mainbranch.In-app download and installation: Streams the platform-matched installer or package update with a real-time progress bar and launches the upgrade automatically.