Skip to content

Installation Guide

Johan Medrano edited this page May 21, 2025 · 2 revisions

🧠 SPM Python Installation Guide

This guide will help you install all the necessary components to use SPM Python.

🚀 TL;DR

Just need the essentials? Here you go:


🔧 Overview

To get started, you’ll need to install the following:

  1. Matlab Runtime
  2. Python (3.9–3.12)
  3. SPM Python

① Install Matlab Runtime

✅ Option A: You have a Matlab license with R2024b

  1. Open Matlab R2024b
  2. Go to Apps > Get More Apps
  3. Search for and install Matlab Compiler SDK

❌ Option B: You don’t have Matlab

  1. Download the Matlab Runtime online:
    ➡️ Matlab Runtime Download Page
  2. Make sure to select:
    • Version: R2024b
    • Platform: Your OS (Windows/macOS/Linux)
  3. Use the default installation path for simplicity

② Install Python

ℹ️ Note on Python Compatibility with MATLAB
Your Python version must match the MATLAB version you are using.
To check compatible versions, visit:
https://www.mathworks.com/support/requirements/python-compatibility.html

For Matlab R2024b, Python 3.9 to 3.12 is required


③ Install SPM Python

Step 1: Open a terminal

  • Windows: Open Command Prompt
  • macOS/Linux: Open Terminal

Step 2: Install the package

pip install spm-python

🧪 Test Your Installation

  1. Open a Python console:

    • macOS: mwpython
    • Windows/Linux: python
  2. In Python, run the following:

from spm import spm
spm()

You should see the SPM interface launch. You're good to go! 🎉