π 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:
- Install the latest Python version from https://www.python.org/.
- Go to the directory where your project is located.
- In the terminal, run:
python3.13 -m venv .venv
- Then, to activate the virtual environment, run
source .venv/bin/activate
# for fish: source .venv/bin/activate.fish
- Every other command after that should use
python -m ...
:
python -m pip install pandas matplotlib
- Profit π!
Sources:
Mostly stolen from: https://www.bitecode.dev/, specifically:
- Why not use x y z?: https://www.bitecode.dev/p/why-not-tell-people-to-simply-use
- Relieving packaging pain: https://www.bitecode.dev/p/relieving-your-python-packaging-pain
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.