You are using an incorrect version specification. Those triple equal signs need to be double equal signs. In other words, you need to use
pip install torch==1.5.1 torchvision==0.6.1 -f https://download.pytorch.org/whl/torch_stable.html