Building offline doc does not work

git clone -b v1.4.0-docs 
cd pytorch/docs
pip install -r requirements.txt
make dirhtml


  File "source/scripts/", line 8, in <module>
    import torch.nn.modules.activation
ModuleNotFoundError: No module named 'torch'
Makefile:17: recipe for target 'figures' failed

What am I missing?

Based on the error it looks like PyTorch isn’t installed in your environment.
I think the requirements.txt just mentions additional requirements besides PyTorch?