Search code examples
linuxpippytorchtorch

Problem with installing pytorch with pip3: -f option requires 1 argument


I am trying to install torch in linux with cuda version 11.1
I checked this: Start Locally | PyTorch It says that the code is

pip3 install --user torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f

However, this line gives this error

-f option requires 1 argument

Can someone help?


Solution

  • you must have missed https://download.pytorch.org/whl/torch_stable.html
    use the below cmd

    pip3 install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html