🐍 Easy Python Setup


This is mostly for myself to remember whenever I start a new Python project. I guess I can replace this in the future with uv, but I’m not 100% convinced yet.

Steps:

  1. Install the latest Python version from https://www.python.org/.
  2. Go to the directory where your project is located.
  3. In the terminal, run:
python3.13 -m venv .venv
  1. Then, to activate the virtual environment, run
source .venv/bin/activate
# for fish: source .venv/bin/activate.fish
  1. Every other command after that should use python -m ...:
python -m pip install pandas matplotlib
  1. Profit 🐍!

Sources:

Mostly stolen from: https://www.bitecode.dev/, specifically:

Actually now that I’m reading through these again, it really seems like uv β€œwon”. I guess it’s still useful to have this as a reference for later though.