microscopic-knife-5995
02/05/2025, 5:38 PMgenerate-lockfiles and the curse of setup.py
Hello team, I think I hit a corner case that no one did previously (based on my Slack search), but I believe it is worth bubbling up. I am basically trying to put flash-attn package into our repo and generate a lockfile. It fails with:
/pip-download-p42iufrh/flash-attn_0dfa01adf4c743469f2b404b4e4a39d3/setup.py", line 22, in <module>
pip: import torch
pip: ModuleNotFoundError: No module named 'torch'
pip: ERROR: python setup.py egg_info exited with 1
Because in their setup.py they import torch. Is there a way to specify the environment to run the generate-lockfiles command? Ideally from the requirements.txt itself and then generate the lockfile with that temporary virtual env?curved-manchester-66006
02/06/2025, 6:56 PMtorch imported but not in setup_requires?
One way to unblock would be to build the needed wheels out of bands and then upload them to a local indexmicroscopic-knife-5995
02/06/2025, 9:48 PMcurved-manchester-66006
02/07/2025, 5:00 PMmicroscopic-knife-5995
02/07/2025, 5:24 PMtorch is not installed. We already have access to torch via PyPI right?curved-manchester-66006
02/07/2025, 6:45 PMflash-attn and placed them in an index, you could sidestep this bootstrapping problemmicroscopic-knife-5995
02/07/2025, 6:47 PMflash-attn maintainers to add torch in the setup_requires field...