pip install torch python code example Example: pip install pytorch windows conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch