Install with uv

An extremely fast Python package and project manager, written in Rust.

- Windows Create venv

Set the windows Set-ExecutionPolicy if occur the policy issues.

powershell as administrator
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

- Download

Download the regarding uv version with:
https://docs.astral.sh/uv/getting-started/installation/

- Install version

uv python install 3.11 3.12

Init projects

To init a python project, use:

uv init <name>
 
uv init example-app

Run projects

To init a python project, use:

uv run main.py

To add a new packages, use:

uv add <package_name>
 
# Add latest package
uv add httpx
 
# Specific version
uv add 'httpx==0.0.10'
 
# Remove package
uv remove <package_name>
uv remove httpx

Migrate requirements.txt

This command will install and migrate requirements.txt packagaes to your projects pyproject.toml:

uv add -r requirements.txt

References

https://docs.astral.sh/uv/reference/cli/#uv