External libraries cannot have a requirements.txt that needs to install a cpp_extension #82132
Labels
module: cpp-extensions
Related to torch.utils.cpp_extension
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🐛 Describe the bug
If an external library (e.g. pytorch/tutorials) has a requirements.txt with the following:
then
pip install -r requirements.txt
errors out with "module torch not found". Here's why:This was discovered in pytorch/tutorials#1968
Pitch
People might need to pin libraries like this (I'm surprised this is the first time we've run into it). So it would be cool if we could offer a way for pip to read the torch dependency in a c++ extension library (e.g. functorch) without actually importing torch.
I am not sure if this is actually possible, since we need to pass setup.py a BuildExtension object somehow
Versions
main
cc @malfet @zou3519
The text was updated successfully, but these errors were encountered: