This is my another answer two years later. Now I use uv and setup-uv action instead. It's a much more convenient and efficient pip replacement, with builtin cache support.