On Uv has a killer feature you should know about (via), Lukas shared to quickly run scripts with the desired Python version and dependencies without leaving a trace on their system.
uv run --python 3.12 --with pandas pythonI usually have multiple dependencies specified in requirements.txt, so here is how to run it with requirements.txt
uv run --python 3.12 --with-requirements requirements.txt python