We’ll use Python for simulation and analysis in this course. While MATLAB has long been the default tool in signal processing, the growth of open‑source libraries (and machine learning in particular) has made Python a practical, popular alternative for research and teaching.
The simplest path is to install a distribution that bundles Python with scientific packages:
Anaconda: https://www.anaconda.com/
Full-featured installer with a large set of pre-installed packages.
Convenient but can be heavy and slower to update.
Miniconda: https://docs.conda.io/
A minimal installer for conda; let you install only what you
need.
Miniforge: https://github.com/conda-forge/miniforge
A community-driven minimal installer similar to Miniconda; often
recommended for better compatibility, faster updates, and fewer
dependency issues.
uv: https://github.com/astral-sh/uv
A modern, fast alternative to pip
/conda
, with
automatic Python management and minimal overhead.
Note: While previous semesters suggested Python 3.7, that version has reached end-of-life. We recommend Python 3.10/3.11, which are stable and widely supported by scientific libraries.
Jupyter Notebook lets you combine executable code, text, math, and figures in one document in the browser—great for demos, homework, and sharing results. Behind the scenes, Jupyter uses the IPython kernel, which adds useful features like tab-completion, rich history, and inline help.
A short, interactive introduction used for this class: - HTML
version: https://users.ece.utexas.edu/~jtamir/files/python_tutorial.html
- Notebook file: https://users.ece.utexas.edu/~jtamir/files/python_tutorial.ipynb
In this class we recommend using VS Code with the
Python and Jupyter extensions. This setup lets you run
.ipynb
files directly, with features:
- Inline execution, just like JupyterLab
- Integrated plots and outputs rendered inside the
editor
- Variable explorer and data viewer, inspect arrays,
DataFrames, and variables in a spreadsheet-like UI
- Full debugging support, set breakpoints, step through
code
- Version control integration, Git, GitHub, etc.
- Rich editing tools, autocomplete, formatting,
etc.
- Multi-file projects: work with .py
scripts, notebooks, and .md
documentation all in one
place
NumPy is the core array library in Python. It provides: - An
efficient N‑dimensional array object
- Broadcasting and vectorized operations
- Tools to interface with C/C++/Fortran
- Linear algebra, FFTs, random sampling, and more
SciPy adds a large collection of algorithms and toolboxes (optimization, signal processing, statistics, etc.) on top of NumPy.
Matplotlib is a cross‑platform plotting library for creating publication‑quality 2D figures.
The following steps will guide you through setting up a Python environment with all necessary dependencies for running Jupyter notebooks in VS Code. They are tested on macOS. If you have any questions, feel free to contact jiachenwang@utexas.edu.
Download and install Visual Studio Code: https://code.visualstudio.com/
Open VS Code, press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS) to open the Extensions sidebar, then search and install:
If prompted, Restart VS Code.
You’ll need a Python distribution that includes a package and environment manager (such as conda). Several options as we’ve mentioned (Anaconda, Miniconda, Miniforge, uv, etc.). Here we use Miniforge as an example because it is lightweight and defaults to the conda-forge channel, which provides broad and up-to-date package support.
S3.1.1. Download the .exe
installer
from the releases page, e.g.,
Miniforge3-Windows-x86_64.exe
.
S3.1.2. Double-click the installer and follow the prompts: -
Register Miniforge as the system Python
(recommended)
- (Optional) Add Miniforge to PATH — you can skip this;
using conda init
is cleaner.
S3.1.3. Open Miniforge Prompt from Start Menu (or a new Command Prompt/PowerShell).
S3.1.4. (If conda isn’t recognized in a normal Command Prompt/PowerShell) initialize your shell:
conda init powershell
conda init cmd.exe
Close and reopen the terminal.
S3.2.1. Download the .sh
installer that
matches your CPU: - Apple Silicon (M1/2/3/4):
Miniforge3-MacOSX-arm64.sh
- Intel:
Miniforge3-MacOSX-x86_64.sh
S3.2.2. In Terminal, run the installer (replace the filename as needed):
bash Miniforge3-MacOSX-arm64.sh
Press Enter to view the license, then type yes to accept.
S3.2.3. Initialize your shell
conda init
Close and reopen Terminal.
Note: If the installer is blocked, go to System Settings -> Privacy & Security, allow the installer, then re-run step 2.
S3.3.1. Download the .sh
installer that
matches your CPU:
Miniforge3-Linux-x86_64.sh
or
Miniforge3-Linux-aarch64.sh
S3.3.2. Make it executable and run it (replace the filename as needed):
chmod +x Miniforge3-Linux-x86_64.sh
./Miniforge3-Linux-x86_64.sh
Press Enter to view the license, then type yes to accept.
S3.3.3. Initialize your shell
conda init
Close and reopen your terminal.
conda --version
conda info
conda config --add channels conda-forge
conda config --set channel_priority strict
Open your Terminal (Miniforge Prompt on Windows) and run
# Create an environment named "ece313" (or whatever you like) with Python
conda create -n ece313 python=3.11
# Activate it
conda activate ece313
# Install some packages
conda install numpy scipy matplotlib jupyter ipykernel
(Optional) Give the kernel a friendly display name in VS Code
python -m ipykernel install --user --name ece313 --display-name "Python 3.11 (ece313)"
ece313
env. This sets the default for
.py
files and helps VS Code remember your env.ece313
.Create a new code cell, set the Language Mode (bottom-right corner) to be Python, and Run it (Press Shift+Enter):
import sys
import numpy as np
import scipy
import matplotlib
import matplotlib.pyplot as plt
print(f"Python: {sys.version.split()[0]}")
print(f"NumPy: {np.__version__}")
print(f"SciPy: {scipy.__version__}")
print(f"Matplotlib: {matplotlib.__version__}")
Generated by jon-doc