Building offline doc does not work

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

result:

  File "source/scripts/build_activation_images.py", 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?