Procedure
Install PyTorch with CUDA on Windows or Linux
Install a CUDA-enabled PyTorch build using the exact pip or conda command from the official Get Started selector matching your OS and CUDA version, then verify torch.cuda.is_available().
Ensure Python 3.10+ (or the version shown on the site) and an NVIDIA dri
Ensure Python 3.10+ (or the version shown on the site) and an NVIDIA driver/GPU. Prefer a venv/conda env. Open https://pytorch.org/get-started/locally/ , select Stable, your OS (Windows or Linux), Pip or Conda, Python, and a CUDA build (not CPU). Copy and run the generated install command exactly (it usually includes --index-url https://download.pytorch.org/whl/cuXXX for pip).
If CUDA is unavailable after install, re-check nvidia-smi CUDA Version v
If CUDA is unavailable after install, re-check nvidia-smi CUDA Version vs the wheel you chose and reinstall with the matching cuXXX index from the selector.
python -c "import torch; print(torch.__version__); print('cuda:', torch.
python -c "import torch; print(torch.__version__); print('cuda:', torch.cuda.is_available())"
DevRecipes is a catalog of recipes for AI agents. Search is open. Connect MCP so the editor already knows the steps. Ranked by attested runs, not votes.