Welcome to the installation guide for PyTorch. Below you will find the steps to install PyTorch on your system. For more detailed information and additional resources, please visit our PyTorch Documentation.
System Requirements
Before installing PyTorch, make sure your system meets the following requirements:
- Python: Ensure you have Python 3.6, 3.7, 3.8, or 3.9 installed.
- Operating System: PyTorch supports Windows, macOS, and Linux.
- CUDA (Optional): If you want to use GPU acceleration, you will need to install CUDA.
Installation Steps
Step 1: Install Python
First, make sure you have Python installed. You can download it from the official Python website.
Step 2: Install PyTorch
To install PyTorch, you can use the following command:
pip install torch torchvision torchaudio
For GPU support, use:
pip install torch torchvision torchaudio cudatoolkit=11.3 -f https://download.pytorch.org/whl/torch_stable.html
Step 3: Verify Installation
After installation, you can verify it by running the following command in your terminal:
python -c "import torch; print(torch.__version__)"
This should print the installed version of PyTorch.
Additional Resources
PyTorch Logo