Setup local dev environment 2 (UV, python virtual environment, python in Visual Code)
UV
We use uv instead of pip for package management because uv is faster, safer, and manages dependencies per project automatically.
UV creates virtual environments, installs packages, locks dependencies, and runs Python — automatically and safely per project.
uv replaces pip + venv + pip-tools with a single, much faster tool.
Key idea:
You work in a project folder, and uv makes sure the right Python + the right packages + the right environment are always used — even without activating a virtual environment.
1. download and install UV for window
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Reference Installation | uv
2. create folder prepare for the project
C:\project\database_agent
3) Inside c:\project\database_agent folder, run the below
UV init
it Creates a modern Python project folder structure as below inside c:\project\database_agent folder:
No comments:
Post a Comment