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.
We will use uv to manage Python and the Python packages for this course. The course uses Python 3.14.
You do not need to install Python separately, create
a virtual environment, or activate an environment yourself.
uv will download and manage Python as needed and will
manage the project environment automatically.
Each student should create a folder named
ece313hfa26 on their computer. This folder
will be the uv project for the course and is a good place
to keep your notebooks, Python scripts, and other computational
work.
Detailed setup instructions for Windows, macOS, and Linux are given below.
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 the course Python project and running Jupyter notebooks in VS Code. 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 for and install:
If prompted, restart VS Code.
We recommend using native Windows for this course. You do not need to install WSL.
Open PowerShell and run:
winget install --id=astral-sh.uv -eIf winget is unavailable, use the official
uv PowerShell installer instead:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Close and reopen PowerShell, then verify the installation:
uv --versionOpen Terminal and run the official installer:
curl -LsSf https://astral.sh/uv/install.sh | shClose and reopen Terminal (or follow the installer’s instructions for updating your shell), then verify the installation:
uv --versionFirst navigate in your terminal to the parent folder where you want
to keep your coursework, such as Documents. Then run:
mkdir ece313hfa26
cd ece313hfa26Initialize this folder as a minimal uv project using
Python 3.14:
uv init --bare --python 3.14 --pin-pythonAdd the scientific Python packages used in the course:
uv add numpy scipy matplotlib
uv add --dev ipykerneluv will download Python 3.14 if needed, resolve the
package dependencies, and create/manage the project environment
automatically. Do not run python -m venv,
uv venv, or environment activation commands.
You should now see files such as pyproject.toml,
.python-version, and uv.lock in the
ece313hfa26 folder. You may also see a .venv
directory after the first package installation. This directory is
created and managed automatically by uv; you do not need to
activate or modify it.
If you need another Python package later in the semester, add it from
inside the ece313hfa26 folder. For example:
uv add scikit-imageFrom inside the ece313hfa26 folder, you can launch VS
Code with:
code .You can also open VS Code normally and choose File -> Open
Folder, then select the ece313hfa26 folder.
For .py files, set the Python interpreter by pressing
Ctrl+Shift+P (Windows/Linux) or
Cmd+Shift+P (macOS), selecting Python: Select
Interpreter, and choosing the Python environment associated
with the ece313hfa26 project.
To create a notebook, use File -> New File -> Jupyter
Notebook, or open an existing .ipynb file.
In the notebook editor, click Select Kernel in the
top-right corner, then choose Python Environments and
select the environment associated with ece313hfa26. It will
typically correspond to:
ece313hfa26\.venv\Scripts\python.exeece313hfa26/.venv/bin/pythonAgain, you do not need to activate this environment; uv
manages it for the project.
Download the course Python tutorial notebook:
Save python_tutorial.ipynb inside your
ece313hfa26 folder, then open it in VS Code.
ece313hfa26 project, as
described in S6.If the tutorial runs successfully, your Python, uv,
Jupyter, and scientific-package setup is working correctly.
If you need to diagnose a setup problem, create a new code cell and run:
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__}")The Python version should begin with 3.14.
When running Python code from the terminal, use uv run
from inside the course folder. For example:
uv run pythonor, for a script named homework.py:
uv run python homework.pyUsing uv run ensures that the command runs with the
Python version and packages associated with the course project.
Generated by jon-doc