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/
If you are using Windows, install VS Code on Windows, not inside WSL.
Choose the instructions below for your operating system. Windows users can either work through WSL or use native Windows.
WSL gives you a Linux environment that runs alongside Windows. It is useful beyond this course because Linux command-line tools are widely used for engineering and scientific computing, remote servers, cloud computing, software development, and research workflows. VS Code can connect directly to WSL, so you can use the normal Windows VS Code interface while your terminal, Python installation, and code run in Linux.
Open PowerShell as Administrator and run:
wsl --installThis enables WSL 2 and installs Ubuntu by default. Restart Windows if prompted. Then open Ubuntu from the Start menu and complete the initial setup by creating a Linux username and password.
You can check the installation from PowerShell with:
wsl --list --verboseYour Ubuntu installation should normally show VERSION 2.
More information: https://learn.microsoft.com/en-us/windows/wsl/install
Open VS Code on Windows, open the Extensions sidebar with Ctrl+Shift+X, and install:
The WSL extension allows VS Code to run its terminal, extensions, Python tools, and Jupyter support inside the Linux environment.
After installing the WSL extension, connect VS Code to Ubuntu before installing the remaining course tools. There are two equivalent ways to do this:
From the Ubuntu terminal:
cd ~
code .or, from VS Code:
Once connected, the lower-left corner of VS Code should say something like WSL: Ubuntu. Any new terminal opened with Terminal -> New Terminal should now be a Linux/Ubuntu terminal.
While VS Code is connected to WSL: Ubuntu, open the Extensions sidebar and install:
If these extensions are already installed on Windows, VS Code may show an Install in WSL: Ubuntu button. Use that button. The important point is that the Python and Jupyter extensions need to be available inside the WSL environment, not only on the Windows side.
Now open a new terminal inside the WSL-connected VS Code window and run:
curl -LsSf https://astral.sh/uv/install.sh | shClose and reopen the terminal if necessary, then verify:
uv --versionIf you use this option, install and run uv
inside WSL, not in Windows PowerShell. It is also best
to keep the course project in the Linux filesystem, such as
~/ece313hfa26, rather than under C:\ or
/mnt/c.
VS Code’s WSL documentation: https://code.visualstudio.com/docs/remote/wsl
If you prefer not to use WSL, uv also works directly on
Windows.
First, in the normal Windows VS Code window, install these extensions:
You do not need the WSL extension for this option.
Then open PowerShell and install
uv:
winget install --id=astral-sh.uv -eIf winget is unavailable, use the official
uv installer instead:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Close and reopen PowerShell, then verify:
uv --versionIn VS Code, install:
Then open Terminal and install uv:
curl -LsSf https://astral.sh/uv/install.sh | shClose and reopen Terminal if necessary, then verify:
uv --versionIn VS Code, install:
Then open a terminal and install uv:
curl -LsSf https://astral.sh/uv/install.sh | shClose and reopen the terminal if necessary, then verify:
uv --versionNavigate to the location where you want to keep your coursework.
~Documents is fineDocuments is fineCreate the course folder and enter it:
mkdir ece313hfa26
cd ece313hfa26If the folder already exists, just cd into it.
Initialize the 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. 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-imageOpen the ece313hfa26 folder itself in
VS Code.
From a terminal inside that folder, you can run:
code .This step is important, especially if you already have another Python distribution such as Anaconda installed.
Press Ctrl+Shift+P (Windows/Linux) or
Cmd+Shift+P (macOS), select Python: Select
Interpreter, and choose the interpreter inside the
ece313hfa26/.venv directory created by
uv.
It should have a path similar to:
/home/<username>/ece313hfa26/.venv/bin/python...\ece313hfa26\.venv\Scripts\python.exe.../ece313hfa26/.venv/bin/pythonDo not select a different system Python, Anaconda, Miniconda,
base, or other conda environment. The path should
clearly point into the .venv directory inside your
ece313hfa26 project.
If the correct interpreter does not appear, first make sure you
opened the ece313hfa26 folder itself in VS Code. Then run
this from a terminal inside the folder:
uv syncAfter uv sync finishes, try Python: Select
Interpreter again.
Open an existing .ipynb notebook, or create one with
File -> New File -> Jupyter Notebook.
In the notebook editor:
ece313hfa26/.venv directory.Again, do not choose an Anaconda/conda kernel or another
Python installation just because it appears in the list. The
selected kernel should correspond to the uv project
environment for this course.
You can verify the selected kernel from a notebook cell:
import sys
print(sys.executable)The output should contain ece313hfa26
and .venv. For example:
/home/username/ece313hfa26/.venv/bin/python
or on native Windows:
C:\Users\username\Documents\ece313hfa26\.venv\Scripts\python.exe
If the path instead points to Anaconda, Miniconda, base,
or some unrelated Python installation, return to Select Kernel
-> Python Environments and choose the
ece313hfa26/.venv interpreter.
Download the course Python tutorial notebook:
Save python_tutorial.ipynb inside your
ece313hfa26 folder, then open it in VS Code.
ece313hfa26/.venv Python environment
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 executable: {sys.executable}")
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, and the
Python executable should point into the .venv directory
inside ece313hfa26.
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