Python Setup Tutorial
Installing Python and Setting Up Python Projects with uv and VSC
Produced by the Research Facilitation team in the Dartmouth College Libraries
Quick Links
Complete UV Tutorial: Python Development with UV and VS Code
Alternative Method: pip + venv: our previous recommended method for setting up Python projects
1. Overview
This guide contains tutorials to walk you through installing Python and getting started with your first Python project on your own computer.
There are many ways to install and run Python. Here, we provide instructions for our recommended Python project set up for new Python users that involves:
installing and using the coding editor and IDE (Integrated Development Environment) software Visual Studio Code (VSC)
installing and using uv to assist in the installation of Python and the creation of reproducible and transportable coding projects (using something called “virtual environments”).
following computational and coding best practices to set up a Python project.
Followers of our previously recommended approach (using pip and venv within VSC) may still find those instructions here.
These coding notebooks and other materials are stored in the python-setup repository in the Dartmouth Libraries Github.
2. Recommended Use of this Guide
- Users with some Python project experience or new users in a hurry: follow the cheatsheets found at the top of Tutorials 1, 2, and 3.
- Users needing some background about why program in Python and why set it up this way, review the Slides.
- New users may want to follow the more detailed instructions found in Tutorials 1 - 3.
- Users who have completed the tutorials can use the UV Cheatsheet as a refresher and continue their learning about using uv to manage Python projects with Complete UV Tutorial.
3. Why UV?
- installs packages 10-100x faster than pip
- Single tool for everything (Python installation, resolving Python path conflicts, virtual enviroment set up, package installation and management)
- Automatic virtual environment management
- Cross-platform consistency
- Create stable and transportable package dependencies with lockfile
4. Designed for:
- in-person / virtual instruction
- or asynchronous, self-paced learning
…for Python beginners and those who have used Python before but want to learn how to better create, import, and manage projects on their own computer.
5. Learning Objectives
Upon completing the lessons offered here, the student will be able to:
- install and run Python on their local computer, whether it be a Mac, PC, or Linux
- set up a new Python project in Visual Studio Code from scratch following programming and computational best practices.
- import an existing Python project and modify it within VSC.
- write their first markdown file (
README.md) - write and run their first Python script and Python Jupyter notebook.
6. Instructor(s) and Years Taught
- Jeremy Mikecz, Research Facilitation (Python Setup, W2026)
7. Other Instructional Information
Level: Beginner (and Intermediate Users looking to establish better project practices)
Duration: Estimated time to complete: 1-3 hours (but could vary tremendously)
Pre-requisites:
1. User is comfortable navigating through files on their computer
8. Required Software
Instructions for installing the following are in the Set Up tutorials outlined in Step 6 above.
- Python (version 3.12 or higher)
- Visual Studio Code
- uv (package manager)
9. LICENSE
Instructional materials produced here are available under the CC BY-NC 4.0 License. Review the license link and the LICENSE page in this repo. Code is available for reuse under the Open Source Initiative’s The MIT License.
10. Acknowledgements
Template Information: This repository was created using the Python Tutorial Template (created by Research Facilitation, Dartmouth Libraries).