pip install torch and torchvision code example Example: get pytorch version python -c "import torch; print(torch.__version__)"