How to install Pytorch in your local system?

To install PyTorch in the local system the best way is to do it using a conda environment.

Depending upon the system and the GPU availability PyTorch can be installed using the instructions given in the official website here: https://pytorch.org/get-started/locally/

For example, to install PyTorch on a Linux environment using conda run the following command:
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

How to check the Pytorch version installed?

To check the version of pytorch installed in the system, open a python interpretor and write the following commands:
import torch
print (torch.__version__)
Or you can write this in the terminal command prompt directly:
python -c "import torch; print (torch.__version__)"
The output will be like this:
1.1.0