Hey Arch! Here's a beginner-friendly guide to get PyTorch running in Visual Studio Code on Windows (Jacksonville vibes!). Takes 5–10 minutes.
python -m venv pytorch-envpytorch-env\Scripts\activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
CPU only:pip install torch torchvision torchaudio
.\pytorch-env\Scripts\python.exeCreate test_torch.py and paste:
import torch
print("PyTorch version:", torch.__version__)
x = torch.rand(5, 3)
print("Random tensor:\n", x)
if torch.cuda.is_available():
print("CUDA/GPU is available! 🎉")
print("Current GPU:", torch.cuda.get_device_name(0))
else:
print("Running on CPU")
Right-click → Run Python File in Terminal. You should see a tensor and version info!
Jupyter in VS Code: Create .ipynb file → write & run PyTorch code cell-by-cell.
Common fixes:
nvidia-smi in terminalNow dive into PyTorch tutorials — you're set! 🚀