uv
on a USB key
-
Environment setup:
export UV_INSTALL_DIR="/g/Documents/tools/uv/bin"
export UV_CACHE_DIR="/g/Documents/tools/uv/cache"
export UV_PYTHON_INSTALL_DIR="/g/Documents/tools/uv/python" -
Install
uv
:curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
uv --version | Display the uv version. |
uv self update | Update uv installation.
Does not work, uv believes it has been installed with an installer. |
uv python list | List all installed Python versions. |
uv python install 3.12 | Install Python version 3.12. |
uv python uninstall 3.12 | Uninstall Python version 3.12. |
uv venv | Create a virtual environment .venv . |
uv venv my-name | Create a virtual environment my-name . |
source .venv/bin/activate | Activate the virtual environment. |
uv pip install -r requirements.txt | Install from a requirements.txt file. |
uv run foobar.py | Run the script foobar.py . |