Hi @BenjaminOddou
thanks for this awesome workflow!
I just set it up, and it took me a while to figure out how to make it respect a local uv venv.
In the end, the solution for me was to:
- create a .venv in the workflow folder
uv venv --python 3.12
- install pillow there
uv pip install pillow
- edit the two api call scripts to include
source .venv/bin/activate before calling python3
Easy enough, but I did not want to modify the workflow, so updates wont break the setup.
Maybe you want to the optional sourcing logic (and add a snippet to the readme that uv venvs are a good idea to keep things contained)
Why?
- Python via brew is a decent alternative since python3 is not shipping with macOS anymore, but...
- it gets hard to isolate things
- brew installs are pretty slow in comparison to creating uv venvs and installing pillow there
- uv venvs per workflow really seem very sensible to me, since workflows often have very differen requirements (maybe we pitch this idea as a suggest pattern to the alfted devs β they are always very helpful and welcome ideas!)
Thanks again,
p
Hi @BenjaminOddou
thanks for this awesome workflow!
I just set it up, and it took me a while to figure out how to make it respect a local uv venv.
In the end, the solution for me was to:
uv venv --python 3.12uv pip install pillowsource .venv/bin/activatebefore calling python3Easy enough, but I did not want to modify the workflow, so updates wont break the setup.
Maybe you want to the optional sourcing logic (and add a snippet to the readme that uv venvs are a good idea to keep things contained)
Why?
Thanks again,
p