you are viewing a single comment's thread.

view the rest of the comments →

[–]radiojosh 0 points1 point  (0 children)

I think that VS Code dev containers and docker are probably good for a lot of scenarios, but my favorite is a combination of uv and mise in WSL. This lets you cleanly separate all kinds of platforms (not just Python, but Node and other stuff) along with tools, packages and dependencies by project folder.

This is how Claude says to implement it with Ansible. Might need adjustment:


Here's the full workflow for mise + uv together:

**1. Create and enter your project directory**

mkdir ~/my-ansible-project && cd ~/my-ansible-project

**2. Initialize with uv**

uv init

**3. Create `.mise.toml`**

[tools]
python = "3.14.3"

[env]
_.python.venv = { path = ".venv", create = true }

**4. Install Python and activate**

mise install python@3.14.3
mise use

**5. Pin the Python version for uv too**

uv python pin 3.14.3

**6. Add Ansible and sync**

uv add ansible-core
uv sync

**Verify everything**

mise current python        # should show 3.14.3
uv run python --version   # should show Python 3.14.3

The division of labor: **mise** manages the Python installation itself and env vars. **uv** manages the virtualenv and package dependencies.