pip install pytorch python3 7 code example Example: conda install pytorch conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch