Activity 01: Getting Started with UV Package Manager
-
Assigned: Friday, 4th September 2026
-
Due and Expiration: Wednesday, 9th September 2026 by classtime.
Note: the expiration date is the last date you can submit your work for a grade.
- CS101: Data Structures
Note: Parts of this work were enhanced by Claude.
You are to complete and push to your repository the following files:
tutorials/tutorial_01_basic_plotting/plotting.py- Completed Python source codetutorials/tutorial_02_prime_distribution/primes.py- Completed Python source codewriting/reflection.md- Reflection document with answers to all questions
- To learn how to install and use UV, a modern Python package manager.
- To understand how package managers help manage project dependencies.
- To practice creating data structures (lists) in Python to visualize data.
- To explore mathematical concepts through data visualization.
- To develop skills in working with isolated virtual environments.
UV is an extremely fast Python package installer and resolver, written in Rust. It serves as a drop-in replacement for pip and pip-tools, but with significantly improved performance and a better user experience. UV helps you manage Python projects, dependencies, and virtual environments efficiently.
- Speed: UV is 10-100x faster than pip for installing packages
- Reliability: Better dependency resolution than pip
- Simplicity: Easy-to-use interface for creating and managing projects
- Compatibility: Works seamlessly with existing Python tools and workflows
- Isolation: Creates isolated environments for each project automatically
For help during any of the following steps, please check the UV website at; https://docs.astral.sh/uv/getting-started/installation/.
Option 1: Using Homebrew (Recommended)
brew install uvOption 2: Using curl
curl -LsSf https://astral.sh/uv/install.sh | shAfter installation, you may need to restart your terminal or run:
source $HOME/.cargo/envUsing curl (All Linux distributions)
curl -LsSf https://astral.sh/uv/install.sh | shAfter installation, restart your terminal or run:
source $HOME/.cargo/envAlternative: Using pip (if you already have Python)
pip install uvOption 1: Using PowerShell (Recommended)
Open PowerShell and run:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Option 2: Using pip (if you already have Python)
pip install uvOption 3: Using winget
winget install --id=astral-sh.uv -eTo verify that UV is installed correctly, open a terminal and run:
uv --versionYou should see output showing the UV version number (e.g., uv 0.5.20 or similar).
If you encounter any issues during installation or want to learn more about UV:
- Official UV Documentation: https://docs.astral.sh/uv/
- UV GitHub Repository: https://github.com/astral-sh/uv
- UV Getting Started Guide: https://docs.astral.sh/uv/getting-started/
- UV Installation Guide: https://docs.astral.sh/uv/getting-started/installation/
- Python Packaging User Guide: https://packaging.python.org/
Troubleshooting Tips:
- If
uvcommand is not found after installation, make sure your PATH environment variable is set correctly - On Windows, you may need to restart your terminal or computer after installation
- If you have permission issues, avoid using
sudowith UV; instead, use the curl installation method - For university/corporate computers with restricted permissions, contact your IT department
In this tutorial, you'll create a UV project that demonstrates data visualization using matplotlib, pandas, and plotly libraries. You will practice creating lists from loops and using them to generate interesting plots.
Location: tutorials/tutorial_01_basic_plotting/
What you will do:
- Initialize a UV project
- Complete TODO sections to generate data using
range()loops - Run the provided plotting code to visualize your data
- Explore different plot types: line plots, bar charts, and scatter plots
Getting Started:
cd tutorials/tutorial_01_basic_plotting
uv init
uv add matplotlib pandas plotly
uv run plotting.pyIn this tutorial, you'll work with a more complex project that explores prime number distributions. You'll write loops to generate prime numbers and analyze their mathematical properties using visualization.
Location: tutorials/tutorial_02_prime_distribution/
What you'll do:
- Initialize a UV project with required dependencies
- Complete loops to identify prime numbers
- Analyze the distribution of primes using ln(n) relationships
- Investigate twin prime distributions
- Visualize mathematical patterns in prime numbers
Getting Started:
cd tutorials/tutorial_02_prime_distribution
uv init
uv add matplotlib pandas plotly numpy
uv run primes.pyAfter completing both tutorials, answer the reflection questions in the writing/reflection.md file. These questions will help you think about package managers, virtual environments, and the code you wrote.
To check if your work meets the assignment requirements, you can use GatorGrade:
gatorgrade --config config/gatorgrade.ymlThis will automatically verify:
- All required files exist
- All TODO markers have been removed
- The reflection document is complete
- You have made at least 5 commits to your repository
Note: Make sure to commit your changes regularly throughout the activity using:
git add .
git commit -m "Descriptive message about your changes"
git pushGood luck, and enjoy exploring Python package management with UV!

