Skip to content

Instantly share code, notes, and snippets.

@1eedaegon
Created April 10, 2025 01:37
Show Gist options
  • Save 1eedaegon/54ddea492c80cf3bf33f95c1cfe141f6 to your computer and use it in GitHub Desktop.
Save 1eedaegon/54ddea492c80cf3bf33f95c1cfe141f6 to your computer and use it in GitHub Desktop.
How to use pip in a Python environment installed with uv
#!/bin/bash
# 0. Install UV
# (Optional)using nix
# nix profile install github:1eedaegon/...s#py
wget -qO- https://astral.sh/uv/install.sh | sh
# 1. Install python
uv venv --python 3.12
# 2. Enable installed python
source .venv/bin/activate
# 3. Enable pip
python -m ensurepip
# 4. Pip upgrade
python -m pip install --upgrade pip
# Enjoy it!
#$ pip --version
#pip 25.0.1 from /home/ec2-user/workspace/airflow/.venv/lib/python3.12/site-packages/pip (python 3.12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment