Fixing a PyTorch CUDA build error on Windows

Follow a Windows PyTorch troubleshooting session: inspect packages, remove base installs, purge pip's cache, and reinstall in a virtual environment.

Player not loading? Watch on YouTube

The presenter investigates "Torch not compiled with CUDA enabled" while trying to launch Joy Caption on Windows. He checks the application's requirements file and uses pip list to inspect installed packages.

He deactivates the application's virtual environment, finds Torch packages in base Python, and removes Torch and related packages. He then runs pip cache purge, activates the virtual environment again, and reruns install.bat. The session ends with another pip list check, which he identifies as showing a CUDA build of Torch.

The commands provide a concrete example of package cleanup and reinstallation for local AI software. The diagnosis needs more caution: the presenter suspects conflicting installations and a cached build, but does not demonstrate how either caused this failure. A normal isolated virtual environment does not necessarily use packages installed in base Python.

The earlier incorrect Torch installation had already been removed when he tries to show it. The final package listing supports his report that a CUDA build was installed, but the transcript includes no successful application launch or GPU computation test. Treat the cleanup as this presenter's troubleshooting sequence, with package removal affecting the selected Python installation.