print version of pytorch code example Example: print version of pytorch python -c "import torch; print(torch.__version__)"