📝 Steps
conda config --append channels conda-forge
conda config --append channels nvidia
conda install cudatoolkit
pip uninstall torch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
🗒️ Notes
conda create –name=pytorch python=3.9
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
# Verify install
python3 -c "import torch; print(torch.cuda.is_available())"
📖 Ref.
https://www.educative.io/answers/how-to-resolve-torch-not-compiled-with-cuda-enabled