I was working on a Python project that was missing a requirements.txt, and with some internet research, I discovered that I could combine uv and pipreqs to generate on.
I ran uvx pipreqs <path/to/root/project/directory> to generate in the project directory.